Need help with Check All
Need help with Check All
Hi,
I've a select-all check box which selects a particular column (also check boxes in each row), with pagination enable. From UI perspective, the select-all and unselect-all works fine but when the form is submitted, only the check box values of the first page are enabled as part of the struts form bean.
Below is the code:
[code]
listTable = $('#recordlist-table').dataTable({
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"sPaginationType": "full_numbers",
"oLanguage": { "sSearch": "Search Record:"},
"oLanguage": { "sZeroRecords": "No matching Record(s) found" }
});
$('#idAnalogCheckBox').click( function() {
var oTable = $('#recordlist-table').dataTable();
if ($('#idAnalogCheckBox').attr('checked'))
{
$('INPUT[name=\'analogType\']', oTable.fnGetNodes()).attr('checked',this.checked);
}
else
{
$('INPUT[name=\'analogType\']', oTable.fnGetNodes()).removeAttr('checked');
}
});
[/code]
Please help!!!!
I've a select-all check box which selects a particular column (also check boxes in each row), with pagination enable. From UI perspective, the select-all and unselect-all works fine but when the form is submitted, only the check box values of the first page are enabled as part of the struts form bean.
Below is the code:
[code]
listTable = $('#recordlist-table').dataTable({
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"sPaginationType": "full_numbers",
"oLanguage": { "sSearch": "Search Record:"},
"oLanguage": { "sZeroRecords": "No matching Record(s) found" }
});
$('#idAnalogCheckBox').click( function() {
var oTable = $('#recordlist-table').dataTable();
if ($('#idAnalogCheckBox').attr('checked'))
{
$('INPUT[name=\'analogType\']', oTable.fnGetNodes()).attr('checked',this.checked);
}
else
{
$('INPUT[name=\'analogType\']', oTable.fnGetNodes()).removeAttr('checked');
}
});
[/code]
Please help!!!!
This discussion has been closed.