Click to See Complete Forum and Search --> : form validation


pnurit
11-03-2003, 08:36 AM
hello

i have programmed a dynamic form, according to the data in the database.

i need now to validate all fields, but im not sure how to, since the form is dynamic.

i`ll be gratefull for any help/advice

thanks in advance
nurit
:confused:

Khalid Ali
11-03-2003, 10:24 AM
You can use DOM methods such as

var inputFields = document.getElementsByTagName("input");

this will give you an array of all input elements on the document.

you can then use validations such as type=="checkbox"

etc...to pin point a prticular type of element