Assuming that you are using de Struts validator, you can try this:

<html:cancel onclick="bCancel=true;">...</html:cancel>

This will "turn off" the form validation and in your action you can check with isCacelled(HttpServletResquest). The bCancel variable is
created by the validator's javascript and it is used to check if the
validade*Form will be called.

Fernando

Patrice Thiebaud wrote:
In a page with Javascript validation, I use the html:cancel tag.

When I click on the Cancel button, the Javascript form validation function is called and an error message is displayed if I didn't enter valid information for the different fields of the form. So the cancellation is not taken into account.
What can I do to bypass the Javascript validation when the Cancel button is clicked ?

Thanks in advance.

--------------------------------------------------------------
Patrice Thiebaud - Presales Senior Consultant
BEA Systems - France
Tour Manhattan
6 place de l'Iris
92095 PARIS La Défense Cédex
Tel: 33 1 41 45 70 27 Mobile: 06 08 05 95 95
--------------------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to