Is there a more elegant solution than this?
function checkUncheckAll(theElement) {
var theForm = theElement.form, z = 0;
for (z=0; z<theForm.length;z++) {
if (theForm[z].type == 'checkbox' && theForm[z].name != 'checkall') {
var lnIndex=theForm[z].name.substr(6,theForm[z].name.length-1);
if (document.getElementById("txtStatus"+lnIndex).valu e=="D") {
if (theElement.checked==true) {
theForm[z].checked=confirm(....);
}
} else {
theForm[z].checked=theElement.checked;
}
}
}
}
--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website:
http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288