Solved

Tab to move through form

Posted on 1999-01-19
10
194 Views
Last Modified: 2010-04-09
I have a web page with a fill-out form on it. How do I control the order in which the Tab button will take a user through the fields.  I need this to work on both Netscape and IE.
0
Comment
Question by:leesalt
  • 3
  • 2
  • 2
  • +3
10 Comments
 

Author Comment

by:leesalt
Comment Utility
Edited text of question
0
 
LVL 4

Expert Comment

by:martinag
Comment Utility
This question has been asked just recently. I think it was deleted because it was impossible.

However, I *think* there is a TABINDEX attribute coming in the version 5 browsers.

One solution is to listen for the tab key (possible in IE4, NN4) and desice what field to jump to. You want me to write such a script?

Martin
0
 
LVL 1

Expert Comment

by:twexperts
Comment Utility
I sure you could do it with some wicked JS. If the current field looses focus, set a flag somewhere which waits for about 0.1 second to see if the user clicked somewhere, if no click was detected then set focus too the next field that you want the user to 'tab' too.
Just a thought ;)
Robin.

0
 
LVL 11

Expert Comment

by:mouatts
Comment Utility
A collegue undertook some significant research into the Javascript approach to this problem and discover that it was possible to do it in both v4 browsers but not with the same code.

I have also seen TABINDEX used in a site developed for IE4 I have to confess I don't know if it actually worked. The people who created this site are a major R&D establishment so they may know something that is generally unknown!

Steve
0
 
LVL 11

Expert Comment

by:mouatts
Comment Utility
I missed martins comment and he may be able to do something I seem to recall my collegues problem related to the tracking of the tab in a frames environment.

By the way Robins approach may work but it assumes that focus has been lost because the user has clicked within the browser. But the focus will move if another application is selected as well.

Steve
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:Michel021497
Comment Utility
You can use the FIELDSET attribute to take control of the tabstops.
For more information take a look at
http://utopia.knoware.nl/users/schluter/doc/tags/index.html
Go to FORM(form) and then click FIELDSET
0
 

Author Comment

by:leesalt
Comment Utility
Michel,
FIELDSET isn't working.  Possibly because I'm using nested tables and frames?  I checked out the web page you mentioned - it's very good, but it doesn't cover my specific situation with the form.  I've tried including the FIELDSET command with every nested table, but no luck (this was after trying it on the major tables first).

Mouatts,
TABINDEX does work with IE4, but not with Netscape.
0
 

Author Comment

by:leesalt
Comment Utility
Tried FIELDSET but it didn't work.  Possibly because I'm using nested tables and frames?  I checked out the web page Michel mentioned - it's very good, but it doesn't cover my specific situation with the form.  I've tried including the FIELDSET command with every nested table, but no luck (this was after trying it on the major tables first).   TABINDEX works fairly well (nested tables bypassed) with IE but not at all with Netscape.
0
 
LVL 4

Expert Comment

by:martinag
Comment Utility
Try TABORDER="anInteger"
It's IE4-specific and will be changed to TABINDEX in future releases.

Martin
0
 
LVL 1

Accepted Solution

by:
staynegative earned 50 total points
Comment Utility
Well.  From experience I believe this holds true...
If you put a table around your form... such that each value is in its own td

such as
<TABLE>
<TR>
<TD>your name:</TD>
<TD><INPUT TYPE=TEXT...></TD>
</TR>
<TD>your email:</TD>
<TD><INPUT TYPE=TEXT...></TD>
</TR>
</TABLE>

I am pretty sure it will move across as such:
1st row 1st column, 1st row 2nd column, 2nd row 1st column...

the only hitch is - if you have a link on 'your name' it will stop there as well on Netscape 4+

But this appears to hold true.  Even if you have several, like a first & last name box separate
<TD><INPUT TYPE=TEXT..><INPUT TYPE=TEXT..></TD>

Try it out.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now