| View previous topic :: View next topic |
| Author |
Message |
mjordan
Joined: 10 Jun 2004
Posts: 3
|
| Posted: Thu Jun 10, 2004 2:34 pm Automatically tabbing between html fields |
|
|
I would like to be able to set up my page so that once a field has been filled in the page will tab to the next field without requiring another keystroke from the user. Is there anyway to accomplish this?
Thanks |
|
|
mjpliv
Joined: 11 May 2004
Posts: 402
Location: Nova Scotia
|
| Posted: Thu Jun 10, 2004 7:34 pm |
|
|
| When you are filling out HTML forms the curser automatically jumps to the next field using the TAB key. |
|
|
mjordan
Joined: 10 Jun 2004
Posts: 3
|
| Posted: Fri Jun 11, 2004 4:01 am reply |
|
|
| Hi- I know that using the tab key will move the cursor to the next field. What I would like to avoid is having to use the tab key. One a field has been filled out, I would like to have the cursor automatically move to the next designated field. Thanks, Chris |
|
|
mjpliv
Joined: 11 May 2004
Posts: 402
Location: Nova Scotia
|
| Posted: Fri Jun 11, 2004 4:40 am |
|
|
| Sorry, that one I cannot answer although I will do a little research on it. I am wondering, however, how would the form "know" when the field was filled in? Selection lists and radio button are one thing but what about text boxes and text areas or even check boxes. How do you determine when the user is finished other than some sort of key stroke? :? |
|
|
mjordan
Joined: 10 Jun 2004
Posts: 3
|
| Posted: Fri Jun 11, 2004 4:53 am |
|
|
| I have been trying to see if I could do this by using the onchange and or set focus. I'm not sure of the sytax or exactly how to use this and have not had much success finding any information. |
|
|
mjpliv
Joined: 11 May 2004
Posts: 402
Location: Nova Scotia
|
| Posted: Mon Jun 14, 2004 4:50 am |
|
|
| I haven't forgotten about you, still looking around for a possible solution! |
|
|
tikisweets
Joined: 06 Mar 2005
Posts: 1
Location: brooklyn
|
| Posted: Sun Mar 06, 2005 2:27 am |
|
|
you can find a code to do this here
http://javascript.internet.com/forms/auto-tab.html |
|
|
shawn
Joined: 15 Jun 2005
Posts: 3
|
| Posted: Wed Jun 15, 2005 7:20 am not the ideal solution but heh... |
|
|
The solution is not ideal (but I have nothing better to offer)
because if you are working with text fields previously filled in, then the manipulation is not intuitive.
Try filling in the the social security number on the page and then REPOSITIONING your cursor (with a click) BEFORE the first digit in what you've filled in. If you now type another number, you are automatically moved to the next field.
I wonder what the behavior SHOULD be, so that it feels comfortable... but the current behavior certanily isn't it. :-( |
|
|
shawn
Joined: 15 Jun 2005
Posts: 3
|
| Posted: Wed Jun 15, 2005 7:34 am simple solution |
|
|
hmmm.
The obvious solution is just to add
onfocus="this.value='';"
into the input field definition. Then the automatic tabbing also kills the values.
I don't know who to include it into the javascript though. :-( |
|
|
shawn
Joined: 15 Jun 2005
Posts: 3
|
| Posted: Wed Jun 15, 2005 7:36 am |
|
|
ooohhh.. no... better... user onKeyDown instead.
that way the value only gets replaced if you start typing.
much nicer especially if you are dealing with multidigits where each field represents one single digit.
/me |
|
|
| |