Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP/ HTML ?

 
Sam Doder
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 64822
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic