Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Focus and priorities in forms
- Matthias Braun
February 16, 2010, 6:37 am
rate this thread
I have a form using two submit buttons:
<form action ...
<input type="submit" value="Cancel" name="UserPasswordCancel" />
<input type="submit" value="Submit" name="UserPasswordSubmit" />
Works fine! Now, if I type in the entries and hit just ENTER, the first
submit will be execute (UserPasswordCancel). How can I modify my page so
that the second button has the "focus" (UserPasswordSubmit)?
- Jukka K. Korpela
February 16, 2010, 4:38 pm
Re: Focus and priorities in forms
Matthias Braun wrote:
Consider rethinking or redesigning.
No it doesn't, as your question indicates. It's confusing and pointless.
Just omit the "Cancel" button. If someone doesn't want to log in, he just
won't. No need to click on any button for that. And don't replace it by a
destruct data button, called "reset" button - in a very simple form that
takes little user input, it does not cause great damage, but neither does it
do any good. It's just an annoyance and a pointless risk: when the user
accidentally hits it, he causes something he didn't mean.
Maybe. Perhaps even commonly. This is one of the reasons why your page does
not work fine.
You can't, in any reliable way. And it's not a matter of focus at all.
- — Previous thread in » HTML Markup Language