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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reference the type and id of an input field in a form

Status
Not open for further replies.

canberrasnag

Programmer
Nov 25, 2004
19
RU
I an writing a wsh file to scan through a form and create an array of the id's of all textbox fields in a form.

I have already writtent e validation code for 1 textbox field in a for by referencing it my name.

What I need to do is scan the form for all non hidden textbox fields and store their ID's so that I can then go through that created list of ID's and validate each of them.

The reason for using ID's is that the form can be localised for different languages. The name of the field changes to suit the displayed language Eg: chinese name for chinese locale. the ID never changes.

I need suggestions on how I can do this please.

many thanks.
 
Hello canberrasnag,

You can use such as
[tt] .getElementsByTagName()[/tt]
or, for ie only
[tt] .all.tags()[/tt]
and many of the variations to walk you through the elements. If by themselves not enough to narrow down the elements, couple them with .getAttribute() method etc.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top