[thelist] js validation suggestions

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


Evoltage,

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
doing:

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?

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the thelist mailing list