Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

major problem with html:cancel and html:submit

 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if I have to show the user in the below order and want to always focus on Submit button it is not possible.

requirement: I have to display the buttons like below order only and there is no change in the clinet-requrement to show the buttons in other way.
And when I click the Enter key the form should be submitted.
[here is mouse moves moves and clicks should ne used]

By displaying the buttons like this html:cancel button gets the focus so the when you click on enter button automatically it cancels your action.

And i dont want like this please let me know if ther is any solution to this problem. And, i dont want to chat html:cancel to Html:button also.

rahul.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might try providing a tabindex attribute for each of your inputs and making sure that the tab index for the submit button is lower than that of the cancel button. That way, when the user exits the last input field, the focus will go to the submit button instead of the cancel button.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Merrill Higginson:
You might try providing a tabindex attribute for each of your inputs and making sure that the tab index for the submit button is lower than that of the cancel button. That way, when the user exits the last input field, the focus will go to the submit button instead of the cancel button.


purpose of the tabindex seems to be deffrent. and this is not a solution to my senario. By default it focuses on the first submit button[in my case it is Cancel button ]. it works fine when you navigate through tab button and when you start typying something the focues gets changed to the the first submit button, which is of course the Cancel in my case.

Same problem with html:form's focus attribute also...

please let me know if there is any simple solution to this problem.

rahul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic