[Javascript] Select all when a chekcbox is checked

Filipiak, Bob (Contractor) filipiab at atsc.army.mil
Mon Apr 30 06:54:49 CDT 2001


When you know the name you use document.formName.selectName..... or you can
use the array by referencing the index of the item:
document.formName.element[0].... would be the first element on the form.
Name are easier if you know them because there is no guarantee what sequence
the elements will be loaded into the array especially if the form gets
modified and another element is added the element you want may have a new
index.

As far as php coding goes, try asking on a php list. It is hard to believe
that the php DOM doesn't allow named references.

Bob Filipiak (Contractor)
MCP 

-----Original Message-----
From: Reuben D Budiardja [mailto:reubendb at goshen.edu]
Sent: Saturday, April 28, 2001 4:46 PM
To: javascript at LaTech.edu
Subject: RE: [Javascript] Select all when a chekcbox is checked


Another question:
Is there any way to address a selection box other by its name? The problme 
is, I'm also using php, and for php the name for <SELECT MULTIPLE> has to 
be something like "name[]" (implying it's an array from select multiple.

While addresing this name in the javascript function, the square bracket 
causes an error.
Any help? What is the general rule to address an object other by its name?

Thanks a lot.
Reuben D. Budiardja



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010430/b4f515a1/attachment.htm>


More information about the Javascript mailing list