This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance 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