Advertisement
Riley_Huntley

script

Apr 5th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function checkAllInRow() {
  2.  
  3.  
  4.  
  5. // Determine the row number from the field name of the button that called this function
  6.  
  7. var row = event.target.name.split(".")[1];
  8.  
  9.  
  10.  
  11. // Get the value of this check box
  12.  
  13. var v = event.target.value;
  14.  
  15.  
  16.  
  17. // Set the new value check box state
  18.  
  19. var nv = v === "Off" ? false : true;
  20.  
  21.  
  22.  
  23. // Loop through the check boxes in the row and toggle their values
  24.  
  25. for (var col = 1; col < 21; col += 1) {
  26.  
  27. getField("cb." + row + "." + col).checkThisBox(0, nv);
  28.  
  29. }
  30.  
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement