You need to add in the 'return':
 
 
onsubmit="return (validateLoginForm(this));"

-----Original Message-----
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 8:37 AM
To: [EMAIL PROTECTED]
Subject: Validator problem


Hi,
 
I am doing client-side validations using Validator framework. If I click on
the submit button, the form is getting submitted even if there are errors in
the form. How can I stop the form from being submitted when there are
errors? JavaScript alerts are being shown properly, but when I click on the
OK button, I want the form to remain unsubmitted.
 
I am using onsubmit="validateLoginForm(this) in <html:form> tag and am
including
 
<html:javascript formName="loginForm"/>
 
before closing the <body> tag.
 
Thanks,
Suresh

Reply via email to