tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Schwartz ...@arrayone.com>
Subject RE: Submit Button - Solved
Date Tue, 07 Sep 2004 14:59:11 GMT
Thanks Ross. That worked.

<input type="Submit" Name="Submit" Value="Next" >
<input type="Submit" Name="Submit" Value="Save" >

Then on action page...

<c:out value = '${param.Submit}' />
displays "Next" or "Save"

Quoting "Ross, Douglas" <DRoss@Kronos.com>:

>> David,
>>
>> I believe the browser only sends the clicked submit button value. So the
>> trick (if you would call it that) is to name all your submit buttons the
>> same:
>>
>> <input type="submit" name="action" value="New">
>> <input type="submit" name="action" value="Edit">
>> <input type="submit" name="action" value="Delete">
>>
>> Whichever one the user clicks is the one sent to the server:
>>
>> request.getParameter("action")=="New" | "Edit" | "Delete";
>>
>> Hope this helps. Note: the img and the input type=image tags do not do
>> this!
>>
>> Doug
>>
>> -----Original Message-----
>> From: David Schwartz [mailto:ds@arrayone.com]
>> Sent: Tuesday, September 07, 2004 9:54 AM
>> To: taglibs-user@jakarta.apache.org
>> Subject: Submit Button
>>
>> Is it possible to determine the name or value of the submit button that
>> user
>> clicked?
>> For example, I have a form with 4 submit buttons - each with a dif name
>> & value.
>> Need to know which was clicked so user can be routed.
>>
>> David Schwartz
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message