Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a script which picks out all

Status
Not open for further replies.

Markh51

Programmer
May 20, 2003
81
GB
I have a script which picks out all the elements by name, I think this is the line what does it ??

while ( elem = f.elements[i++] )

How do I change this line so that is pick up the elements by ID ??

Thanks,
Mark
 
Well, the line
Code:
while ( elem = f.elements[i++] )
doesn't pick out the elements of a form by Name, it picks them out by the order in which they are placed on the form.

To get any form element by name use [tt] document.formName.elementName[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top