Click to See Complete Forum and Search --> : How to check number of fields in form?


andriu
12-16-2003, 05:27 AM
I need JavaScript function that can check by herself
how many fields are in any html form.
I want to use this function to check if at least one of all fields in form has been filled.
I also want to use one function to many forms with different
number of fields, so it should find how many of fields
is in each form.

Thanks for help.

Khalid Ali
12-16-2003, 06:46 AM
alert(document.formName.length)

will display number of all elements in a form