Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

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).value=="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
Man-wai Chang said the following on 5/15/2007 11:05 PM:

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

> How can one be an ePOS "Expert" if they can't create a cross-browser
> 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

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc