Connecting Tech Pros Worldwide Help | Site Map

Iterate all object of a specific name

 
LinkBack Thread Tools Search this Thread
  #1  
Old May 16th, 2007, 03:15 AM
Man-wai Chang
Guest
 
Posts: n/a
Default Iterate all object of a specific name


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

  #2  
Old May 17th, 2007, 12:45 AM
Randy Webb
Guest
 
Posts: n/a
Default Re: Iterate all object of a specific name

Man-wai Chang said the following on 5/15/2007 11:05 PM:
Quote:
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
How can one be an ePOS "Expert" if they can't create a cross-browser
website?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
  #3  
Old May 17th, 2007, 01:45 AM
Man-wai Chang
Guest
 
Posts: n/a
Default Re: Iterate all object of a specific name

How can one be an ePOS "Expert" if they can't create a cross-browser
Quote:
website?
That line is an ad. Let's go back to javascript.

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

--
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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.