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

button focus problem with multiple <html:submit> buttons

 
Mohit Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers

I have a JSP having two textbox with "Cancel" and "Submit" buttons. Both buttons are <html:submit> type.

After typing in textbox if we press <Enter> key, the Cancel button is executed. This is because the cancel button is the first button on page and is by default focussed on pressing <Enter> key.

I want the second button ("Submit") to be focussed by default.

My Code is something like -

<html:password property="newPassword"/>
<html:password property="reenterPassword"/>

<html:submit property="bipSubmit" value="Cancel"/>
<html:submit property="bipSubmit" value="Submit"/>

Please suggest how to implement this, I prefer not to use JAVASCRIPT.

Its urgent.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic