You need to sign in to do that
Don't have an account?
JQuery for update checkBox on list of record
Hello,
I have list of records in page with checkbox on each (with wrapper class).
I'm trying to write with JQuery that only one record will be selected at time.
Can someone advise what wrong with below script?
It's seems that this script update the wrong data + changing the order in the list...
<script>
var j$ = jQuery.noConflict();
jQuery(document).ready(function() {
jQuery(".selected-checkbox").click(function() {
var checkedRow = this;
//alert('Hello world, part 2!'+ checkedRow );
jQuery(".selected-checkbox").each(
function() {
this.checked= false;
}
);
checkedRow.checked= true;
});
});
</script>
Could you please share your code snippet, of course with simplified fields & hiding your business objective.
Happy to help you!
Regards,
Digamber Prasad
Thanks for reply.
I'm adding the page code.
Could you also please share extensions, so that I can do dry run of your code.
Regards,
Digamber Prasad
After further testing I found that it doesn't related to the JQuery.
Even if I remove it, when pressing save it select the wrong record.
Probably indeed related to the controller.
I'll check and raise issue if needed.