Solved

Tab to move through form

Posted on 1999-01-19
10
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 

Author Comment

by:leesalt
ID: 1845440
Edited text of question
0
 
LVL 4

Expert Comment

by:martinag
ID: 1845441
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
ID: 1845442
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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 11

Expert Comment

by:mouatts
ID: 1845443
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
ID: 1845444
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
 
LVL 1

Expert Comment

by:Michel021497
ID: 1845445
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
ID: 1845446
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
ID: 1845447
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
ID: 1845448
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
ID: 1845449
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 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