The following code will iterate all your checkbox elements (within the form you specify), and disable them all. Tested in ie and mozilla only.


function disableAllChecks(fmobj) {
for (var i=0;i var e = fmobj.elements[i];
if ( e.type=='checkbox' ) {
e.disabled = true;
}
}
}

If you want to check the checkboxes, change the red line to


e.checked = true;

Leave a Reply