PDA

View Full Version : ok i can do this



kink
12-21-2004, 10:39 PM
uhmm i have a forn script that validates an email address.
problem is when it sdends up th alert for a bad address it still logs in when the alert is closed anybody know how to stop the login when the address isnt good?

Chroder
03-12-2005, 06:21 PM
Have the validation function return false on error, then put in the "return" keyword when calling the function. For example:


<form action="someaction.php" method="post" onsubmit="return validate();">

If the function returns false, the form will cancel it's submit.

kink
03-12-2005, 08:43 PM
cool chroder tk