checkall in table list

This commit is contained in:
Marc Delisle
2002-01-03 00:40:20 +00:00
parent 6140c74dad
commit 890073e60f
3 changed files with 47 additions and 3 deletions

View File

@@ -325,3 +325,22 @@ function setPointer(theRow, thePointerColor)
return true;
} // end of the 'setPointer()' function
/**
* Checks/unchecks all tables
*
* @param string the form name
* @param boolean whether to check or to uncheck the element
*
* @return boolean always true
*/
function setCheckboxes(the_form, do_check) {
var elts = document.forms[the_form].elements['selected_tbl[]'];
var elts_cnt = elts.length;
for (var i = 0; i < elts_cnt; i++) {
elts[i].checked = do_check;
} // end for
return true;
} // end of the 'setCheckboxes()' function