Search form validation (javascript)
Posted: 29 November 2007 06:23 AM   [ Ignore ]
Newbie
Rank
Total Posts:  7
Joined  2007-09-13

How do I validate a search form with javascript? Say, a keyword is not entered and with Internet explorer I am able to show the alert box with the message and nothing is submitted if the input box did not have any keywords. But with Mozilla firefox, it does show the alert message, but it then goes to the index page i.e. it submits anyway. How do I stop this for Mozilla Firefox.

Profile
 
 
Posted: 04 December 2007 12:00 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

You would need to use the onSubmit Module, and a combonation of your own javascript.

 Signature 
Profile