Forum Moderators: phranque
I know how to build forms, however. I lack one skill: How do I create a form where a person's cursor automatically jumps to the next field when he/she completes the prior field? E.g. I'm done filling out the "phone" field and now the cursor automatacally jumps to the "state" field on the form. How and please explain.
Thanks
And, if the user has javascript turned off, it wouldn't work anyway.
Rogerd makes a good point. It only works on fields where you know the max number of chars.
Personally, from a usability view, I don't like those types of "enhancements."
For example, I frequently manage drop-down lists via the keyboard. You can use the up/down arrows, press a letter and the menu jumps down to entries beginning with that letter, etc. The last thing I was is for some Javascript snippet to decide when I am done filling in a field and move me to the next one, because there is no way in principle for it to know that.
Also what about people who use the tab key to jump to the next field, only to find that the JS had moved them automatically and they're suddenly typing in the wrong field?
Even your phone number example is far from straightforward. What if they're not in the US? What if they need to type in an extension? What if they mistype a digit and want to back up and edit it?
Moving the focus is useful if validation fails, but in normal forms, that's about the extent of it.
Kaled.