Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] form validation function


  • From: javascript@xxxxxxxxxx (Cutter (JavaScript))
  • Subject: [Javascript] form validation function
  • Date: Thu, 23 Jan 2003 10:34:41 -0500

I would like to write a form validation function where I pass the names 
of all of the fields to validate to the function, which then loops 
through the list to make sure that no field is empty and returns true.

There's a little more to it, but that's the basics. My question is, is 
there a way to test if a field is an input or a select? Since accessing 
select values (especially cross browser) is not so straight forward I 
will need to plan for this contingency. Any suggestions?

Cutter