Iterate all object of a specific name

M

Man-wai Chang

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).value=="D") {
if (theElement.checked==true) {
theForm[z].checked=confirm(....);
}
} else {
theForm[z].checked=theElement.checked;
}
}
}
}
 
M

Man-wai Chang

How can one be an ePOS "Expert" if they can't create a cross-browser

That line is an ad. Let's go back to javascript.

You went off-topic in my opinion.. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top