Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Tab Order 2

Status
Not open for further replies.

Quintios

Technical User
Mar 7, 2002
482
US
I have a form with several text entry fields in it. I'd like the user to be able to tab from field to field in a certain order. How do I force that?

Thanks! Onwards,

Q-
 
Not sure if you can, by default it goes from one field to the next... I have not failed; I have merely found 100,000 different ways of not succeding...
 
Use the "TabIndex" attribute:

<input type=&quot;text&quot; name=&quot;three&quot;>
<input type=&quot;text&quot; name=&quot;two&quot; tabindex=&quot;2&quot;>
<input type=&quot;text&quot; name=&quot;one&quot; tabindex=&quot;1&quot;>
<input type=&quot;text&quot; name=&quot;four&quot; tabindex=&quot;0&quot;>

The tab order above is one, two, three, four because the positive TabIndex values receive focus first.
TabIndex = 0 or no TabIndex are visited after the elements with a positive TabIndex and receive focus based on which appears first.
 
Sweet!! I suppose I should have known that from my access experience. Who woulda thought they'd be similar like that. :)

Thank you! Onwards,

Q-
 
Wow, guess I was wrong... I have not failed; I have merely found 100,000 different ways of not succeding...
 
xutopia, well good for you...you did a good thing, [smile] Forget the Nobel Peace prize, I just want to take over the world!! [hammer]
 
GUJU don't take it the wrong way. You always help people out and teach a heck of a lot of stuff to other people (we share 4 forums in our threadminder). For once someone was capable of teaching you some stuff so that is why I thought it deserves a star. ;) Gary Haran
 
xutopia. its ok...
Believe me, I did understand what you meant...sorry if you thought my post was too defensive...[smile] Forget the Nobel Peace prize, I just want to take over the world!! [hammer]
 
maybe I just took it the wrong way! :) LOL All this typed text fails to express what we really mean sometimes! :)

Well I am off to bed! Ciao Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top