[thelist] js validation suggestions

Tom Dell'Aringa pixelmech at yahoo.com
Mon Feb 10 08:16:01 CST 2003


I have a form that I am required to do client side JS validation on,
its an advanced search form. One of the validations I have to do is
to make sure at least one criteria is specified for search.

There are 12 fields they could enter a search criteria, 2 are select
drop downs.

I'm thinking there might be a better way to validate this instead of

if((field == "") && (field == "") && (field == "") etc ad nauseum..)
  //fill in a search criteria dolt!

OTOH, I don't want to write a huge function when a simple one will
do. Any suggestions?


var me = tom.pixelmech.webDeveloper();

[Making A Commercial Case for Adopting Web Standards]

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the thelist mailing list