File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 63868

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] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: JSP/ HTML ?
It's not a secret anymore!