This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes JSP/ HTML ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JSP/ HTML ?" Watch "JSP/ HTML ?" New topic


Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
I have a form with 2 submit buttons as shown below.

I want to beable to post to the my_profile.jsp and know what button the person pushed. If he pushed the save button do something else if he pused the cancel button do something else.

request.getParameters() IS their away to differentiate between a button that was pushed from a button that wasn't pushed? If so how?

I was thinking I had to use javascript and hidden variables?
But if anybody can tell me of another way or show me a good way to go about this I would be greatful.
Thanks again.
[ November 18, 2008: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60752

What is submitted for the "control" parameter for each button press?

Also, please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

Please go back and change your post to add a more meaningful subject by clicking the .

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: JSP/ HTML ?
Similar Threads
how to get the text box value
Losing data from submit using the enter key
Getting html form name
Onclick form submission
Cancel button should take to previous page