<script language="javascript">
function FormSetValueHiddenParam( form, element, value )
{
form.elements[element].value = value;
}
</script>
<htm:form .... >
<html:hidden property="action" value="noaction" />
<html:submit value="Add It!"
onclick="FormSetValueHiddenParam('action','add')" />
<html:submit value="Remove It!"
onclick="FormSetValueHiddenParam('action','remove')" />
<html:submit value="Change It!"
onclick="FormSetValueHiddenParam('action','change')" />
</htm:form>
"Comprende , Kappich, Understand"
U.T.F.O
--
Peter Pilgrim ++44 (0)207-545-9923
//_\\
"Mathematics is essentially the study of islands of =======
disparate subjects in a sea of ignorance." || ! ||
Andrew Wiles _____________
---------------------------------------- Message History
----------------------------------------
From: "emmanuel.boudrant" <[EMAIL PROTECTED]> on 20/11/2001 16:20 CET
Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
cc:
Subject: Re: which button pressed?
Hi,
I suggest you to use : <html:submit property="propertyname" value="buttonname"/>
ex:
<html:submit property="myAction" value="add"/>
<html:submit property="myAction" value="del"/>
and in Action class, to determine witch button is pressed:
String button = request.getParameter("myAction");
if ( button.equals("add") ) { ... }
But I don't know if <html:submit property="propertyname" value="</bean:message ...
/>"/> work ?
M�ris Orbid�ns <[EMAIL PROTECTED]> a �crit :
Hello all
I have several submit buttons like this:
key="button.prev"/>
key="button.next"/>
key="button.save"/>
key="button.delete"/>
key="button.add"/>
The question is: How to determine which one has been pressed ?
Maris Orbidans
--
To unsubscribe, e-mail:
For additional commands, e-mail:
---------------------------------
Yahoo! Courrier -- Une adresse @yahoo.fr gratuite et en fran�ais !
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorized copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>