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.
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.