Help? Need to autotab between fields . . .

M

Mike

Hi! I'm putting together a data entry form. One of the entries will
be a telephone number. I've been directed to implement this by using
three separate fields -- the first being for area code, the second for
exchange, and the last for the last 4 digits of the phone number.

When users enter 3 digits in the area code field, instead of hitting
the tab key to move to the exchange field, I want this to happen
automatically upon entry of the last digit. And after the 3 digit
exchange is entered, they should automatically tab to the last field.

Can someone help? If script is required, can you tell me where to
find an example? I'm new to this, have little experience with script,
and am being rushed to finish.

Thanks in advance,

Mike
 
R

Richard Cornford

Andrew Urquhart wrote:
Sounds like one of those forms that I fill in every day and go into
auto-pilot when I do so. Except in this case when I look back at the
screen after completing the form it might look like:

Name: Andrew Urquhart
Phone: 01234 [blank] 567
Address: 789
City: 221b Baker Street
Post Code: London

... because I expected the form to function like other forms I'm used
to filling in and I used the tab key without realising that there was
some script in there that was trying to be helpful, but actually got
in the way and confused things. When I go back to edit the phone
number I'd bet that the script will keep 'helpfully' pushing the
cursor into the next input box as I try to delete '567'. So in
summary I'd argue that the requirements are unhelpful to the user,
well, if that user is me at least :)

It is one of those requirements that are thought up by someone who
exclusively uses a mouse to navigate between form fields and thinks this
would be helpful to *them*, and by extension to everyone else as nobody
would ever use a computer in any different way form them.

The result is an interface that assists the users of mice (and
presumably other pointing devices) and actively hinders the users of
keyboards; those of us who can touch-type, serious laptop users (who
know all the keyboard shortcuts because those laptop pointing devices
really are not much use for anything) and anyone disabled in such a way
as to render mouse/pointing device use non-viable while leaving the
keyboard useable.

On the other hand the facility might be of value to the users of
pointing devices. So I wonder whether it could be implemented in a way
that provided the action for them but did not interfere with keyboard
users. A possible starting point would be to trigger this "helpful"
feature only if a pointing device was initially used to focus the first
telephone field. Monitoring a mousedown or click event on that field, so
that users who tabbed into the field with the keyboard would not trigger
the script. Maybe combined with monitoring keydown events on all form
fields, or at the document level, and aborting all pointing device
assisting scripts whenever a tab key press was detected. (best of both
worlds?)

Richard.
 
M

Matt Kruse

Richard said:
It is one of those requirements that are thought up by someone who
exclusively uses a mouse to navigate between form fields and thinks
this would be helpful to *them*, and by extension to everyone else as
nobody would ever use a computer in any different way form them.

Not necessarily true.

I've encountered this requirements several times, and each time it was to
make a web-based form match functionality to an old terminal application or
something. So, users are very used to entering data in a certain way (not
having to tab between fields) and want to maintain that interface on the web
form.

This is why I wrote the solution which still exists at the url below, even
though the code is old and I usually disagree with the concept even being
used. For web sites that are open to the public, auto-tabbing is a bad idea,
IMO.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top