function checkAll(field)

// Sets all checkboxes in a form to be checked
// Just pass the function the name of the field that needs setting
// e.g. onClick="checkAll(document.form.checkboxName);"

{
if (typeof(field.length) == "undefined")

{
field.checked = true ;
addToMutationsList(field);

}
for (i = 0; i < field.length; i++) field[i].checked = true ; if (i == field.length) { addToMutationsList(field); } }

How to set all checkboxes in a form to be checked

Leave a Reply

Your email address will not be published. Required fields are marked *

fifty four − 53 =