If you want to validation to be turned off in both javascript and server
side you ahve to use the  <html:cancel> tag

You will not be able to set the property for this tag because if you do,
struts won't know where to look to find the submittal to see if it should or
shouldn't do the server side validation.

Your onClick could will work fine for the javascript validation but you will
not need it if you use <html:cancel> because it will put that code in there
for you.

--
Sloan


----- Original Message ----- 
From: "David Stemm" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 12:38 PM
Subject: Bypassing Form Validation


I'm having trouble trying to cancel out of a form.  I have a cancel button
that looks like this:

<html:submit title="Cancel" value="Cancel" property="submit" tabindex='24'
onclick="bCancel=true;"/>

and while the onclick event does cancel out the javascript validation it
still goes ahead and performs the server-side validation and I get errors
saying certain fields are required, etc.  I'm using a DynaValidatorForm and
my action class inherits from DispatchAction.  Anybody have any ideas?


David Stemm


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to