I have a function that I call to check or uncheck all checkboxes on a
form - I use a 'master' checkbox to do this much like hotmail has to
check all mail messages - the code works fine if I name my checkboxes
like this:
chk1
chk1
chk1
But I need to name them with an array for deletion purposes which is
already coded and working - I need to name them like this:
chk[0]
chk[1]
chk[2]
I can't get the check/uncheck function to work with array checkbox
names - at the bottom of this I show my main checkbox I use to check
or uncheck all the others checkboxes named chk1 - but how do I pass
the name of the array checkboxes???
<!-- Hide javascript code
function check_checkboxe s(pObj, pFlag)
{
if (pObj.length) {
for (var iCount=0; iCount<pObj.len gth; iCount++)
pObj [ iCount ].checked = pFlag;
}
else {
pObj.checked = pFlag;
}
}
// stop hiding javascript -->
</SCRIPT>
<INPUT TYPE="checkbox" NAME="frm_check _all"
onClick="check_ checkboxes(docu ment.pmsgs_form .chk1,
frm_check_all.c hecked)">Check/UnCheck All</TD>