• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

major problem with html:cancel and html:submit

 
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
What a show! What atmosphere! What fun! What a tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic