ringnebula
08-30-2004, 03:22 PM
Hi all,
Working on a search page here and was looking for some help. I have a number of fields on this search page and a user only needs to fill one or more to do a search. What I would like to do is use javascript to check the form values and return an error if ALL of the fields are blank but not if one or more contain text.
So, this is where I get stuck.... It would appear that I can't do something like:
if
(document.forms[0].elements .value=="")
Will I need to write it up with a bunch of and statements and if so, how to do this in js?
Thanks
Working on a search page here and was looking for some help. I have a number of fields on this search page and a user only needs to fill one or more to do a search. What I would like to do is use javascript to check the form values and return an error if ALL of the fields are blank but not if one or more contain text.
So, this is where I get stuck.... It would appear that I can't do something like:
if
(document.forms[0].elements .value=="")
Will I need to write it up with a bunch of and statements and if so, how to do this in js?
Thanks
