File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes tabbing in Netscape Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "tabbing in Netscape" Watch "tabbing in Netscape" New topic
Author

tabbing in Netscape

Phil Perkins
Ranch Hand

Joined: Nov 21, 2000
Posts: 40
We have a bug while using Netscape. On one of our pages we set the focus to a particular text input box. When the user clicks the tab button, a link at the top of the page gains focus. How can implement the javascript to tab to the correct text input box.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Phil
You could just use the tabindex property for the HTML elements on the page. It applies to the following elements/tags: A, AREA, BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA. Just assign them a value like this:
<input type=text tabindex=1 name=text1>
<a href='somepage.html tabindex=2>
<input type=text tabindex=1152 name=text2>
hope that helps
Dave
When the page is loaded the order will go from the 1st text box to the hyperlink to the next text box. The numbers don't have to be in order and can go from 0 to 32767.

Dave
Phil Perkins
Ranch Hand

Joined: Nov 21, 2000
Posts: 40
Thanks for the response.
We tried the tabindex but it did not work in older versions of Netscape. I forgot to mention in the last post that the link is in another frame. So we set focus in one frame and when the tab button is clicked focus is sent to the top frame from the bottom frame.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
The only other option I can think of is the javascript onKeyPressed event but that is new in 1.2 so it probably wouldn't work in the older browsers either. How 'bout an applet where you would have full control over everything? That may be too much for what you need though.

Dave
 
Don't get me started about those stupid light bulbs.
 
subject: tabbing in Netscape