my dog learned polymorphism
The moose likes HTML, CSS and JavaScript and the fly likes Which submit is pressed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Which submit is pressed" Watch "Which submit is pressed" New topic

Which submit is pressed

Mahesh Lohi
Ranch Hand

Joined: Jun 22, 2009
Posts: 151
I have a form with two submits. Can i know which submit is pressed by the uses in the java class..

Thank you in advance
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

This is an HTML, not a JSP question. As such, it has been moved to the HTML forum.

[Asking smart questions] [About Bear] [Books by Bear]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Only the submit button you clicked will be sent to the server.

GenRocket - Experts at Building Test Data
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13027
Note that a submit button can have a unique name as well as text value.

I agree. Here's the link:
subject: Which submit is pressed
It's not a secret anymore!