3 button each doing a submit seems a bit confusing..
why not trap onClick for all 3 buttons and then redirect to a JS method

The onClick method will perform any necessary validation and ultimately pass to form.action and form.submit e.g.
document.formName.action="WhateverTheActionIs";
document.formName.submit();

Just a thought..
Martin-
----- Original Message ----- From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, July 26, 2005 11:27 AM
Subject: Re: Which button was pressed?


From: "Braun, James F" <[EMAIL PROTECTED]>

The value of the button pressed
will be stored in the bean's submit variable (which you must create).
The bean:message tag is there so that the button's title will be set
according to the locale setting. app.submit, app.renew, and app.replace
refer to the application resource file(s).

You may also want to add a "hidden" button at the very top of the form, with
a value that causes your app to simply redisplay the form.

At least on IE, pressing enter in a text field will submit the form without the user pressing _any_ of the buttons. But IE will send the value for the
'first' button on the form.

This is especially fun if you don't realize what's happening, and the
'first' button on your form deletes something. ;)

--
Wendy Smoak



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



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

Reply via email to