|
If those are the only checkboxes in a form
you can do the following: f function selectAllCheckBox(actionForm){ for ( i = 0; i
< actionForm.elements.length; i++
) { if (actionForm.elements[i].type == 'checkbox' ) { actionForm.elements[i].checked = true; } } } function clearAllCheckBox(actionForm){ for ( i = 0; i
< actionForm.elements.length; i++
) { if (actionForm.elements[i].type == 'checkbox' ) { actionForm.elements[i].checked = false; } } } function invertCheckBox(actionForm){ for ( i = 0; i
< actionForm.elements.length; i++
) { if (actionForm.elements[i].type == 'checkbox' ) { if (actionForm.elements[i].checked == true) { actionForm.elements[i].checked = false; } else { actionForm.elements[i].checked = true; } } } } -----Original Message----- Hi, I am using
<t:dataTable> to show the first column as the checkbox for each row. Is
there a way to add "select all" and "de-select all"
_javascript_ into these checkboxes? I don't want to go back to the server side to
do such simple thing. Please shed some lights. Thanks for your help! Emily |
- RE: How to do JavaScript select all and de-selected ... Matias Gomez Carabias

