The javascript will be output by the html:form tag and it stops javascript validation.

The cancel button should look like this:

<input type="submit" name="org.apache.struts.taglib.html.CANCEL" value="Cancel" onclick="bCancel=true;" />

The JSP should look like this:

<html:cancel>Cancel or whatever</html:cancel>


Adam


On 03/14/2004 12:56 AM Dean A. Hoover wrote:
I have an html:form with a
html:submit and an html:cancel.
According to the documentation for
html:cancel:

"Pressing of this submit button causes
the action servlet to bypass calling the
associated form bean validate() method."

I tried it and it did validation anyway.
Then I looked at the generated HTML
and I see:

<input type="submit" name="method" value="Next">
<input type="submit" name="method" value="Cancel" onclick="bCancel=true;">

The only difference I see is the onclick attribute.
How is that supposed to do anything, given that
that there isn't any javascript in the file. What am
I missing here?

Dean Hoover


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




--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


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



Reply via email to