change the onsubmit to onsubmit="return validateNewTemplateForm(this)"
dave > -----Original Message----- > From: Michael P [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 1:02 PM > To: [EMAIL PROTECTED] > Subject: Validator Javscript still submits. > > > I'm using the Validator with Javascript on several forms and having a > problem where the form submits even if the javascript did not validate > properly. It pops up the alerts, then submits the form anyway, which > comes back with the errors in the HTML. This isn't, I > assume, the desired > behaviour. Could someone tell me what I'm doing wrong? > > Here's a snippet: > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > <html:javascript formName="newTemplateForm" dynamicJavascript="true" > staticJavascript="false"/> > <script language="JavaScript" src="staticjavascript.jsp"/></script> > <html:html> > <head><title>New Template</title></head> > <body> > <html:form action="/rendertemplate" method="GET" > onsubmit="validateNewTemplateForm(this)"> > <html:errors/> > Label: <html:text property="label" maxlength="256"/><br/> > Notes: <html:text property="notes" maxlength="2048" > size="100"/><br/> > <html:hidden property="pdfFile"/> > <html:submit title="Fill Out Template"/> > </html:form> > </html:html> > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

