DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   HTML and CSS (http://www.daniweb.com/forums/forum143.html)
-   -   Tab control on hidden input fields (http://www.daniweb.com/forums/thread639.html)

bboyle Jul 8th, 2003 6:03 am
Tab control on hidden input fields
 
When I have a hidden input field on my webpage and I use the tab key to traverse my fields, the cursor always moves to the hidden input field. This means that I have to press tab twice to move to the next visible field. Is there any way that I can skip the hidden input field when I am using the tab key?
Thanks, B.

cscgal Jul 8th, 2003 11:27 am
Re: Tab control on hidden input fields
 
Sure, just add the "tabindex" parameter to every form field you want the tab key to traverse. For example.

<input type="text" tabindex="0">

Each form field should increment the tabindex (0, 1, 2, ...) in the order you want the tab key to proceed. For elements you don't want the tab key to stop at, set the tabindex to -1.


All times are GMT -4. The time now is 11:51 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC