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

Counting Question

Status
Not open for further replies.

Barbara265

Technical User
Oct 16, 2000
30
0
0
US
Hi,

Does anyone know if there's a way to count the number of drop-down boxes on a form?

Thanks!
Barbara
 
Hi,

Could you be more specific? If your form gets submitted to a server-side script, then I don't see any problem iterating thru the the request to get the number of drop-downs and their content.

Bye.
 
Loop thru the form.elements array, asking each one if it's type is "select" - and count them. Iterating thru the request (query string) will only give you "name=value" pairs, will it not? ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top