Posted By

davaodude on 03/29/07


Tagged

form checkbox


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


Toggle specific row of checkboxes


 / Published in: JavaScript
 

  1. function toggleDown(nm) {
  2. // written by Daniel P 3/21/07
  3. // toggle checkboxes down a whole column
  4. var lastskuindex = document.getElementById('lastindex');
  5. for ( i=0; i<=lastskuindex.value; i++ ) {
  6. if (document.getElementById(nm+i).checked) { // this one is currently checked
  7. document.getElementById(nm+i).checked = false;
  8. } else {
  9. document.getElementById(nm+i).checked = true;
  10. }
  11. } // looping down the rows
  12. }

Report this snippet  

You need to login to post a comment.