I know I can move from textbox to textbox with the Tab key; but, I would like to be able to do the same with the ENTER key. I have a form where some responses are in textboxes while others are in drop down boxes. With the drop down box I use an onChange event to make the next question visible and move focus to that next question. If the response is in a textbox I am using an onBlur event to make the next question visible and move focus to that next question. All is fine if the user knows to use the Tab key; but, if they don't it just sits there waiting for something to happen. What type of event handler should I use instead of onBlur to move on?
Moving from object to object with ENTER
Collapse
X
-
why don't use the onchange event here too? this fires when the user has entered a new value into the textfield ... another option would be to use the keypress event where you might ask for the pressed key and proceed the way you need/want to ...
kind regards -
-
I really don't reccomend doing that, users are used to press the tab key to change focus and enter key to submit (except for textareas), if you change that it'll result in a major usability issue.Comment
-
good point ... even when i wouldn't say that will cause a major issue ... but certainly it is different from standard behaviour, but not that much. most forms try the submit on enter but validate the fields and focus the next one that needs correction ... or in most cases ... just need input. so in fact this common validation logic forces the enter to act as a tab key ... at least it feels that way.Comment
Comment