943,485 Members | Top Members by Rank

Ad:
Jul 8th, 2003
0

Tab control on hidden input fields

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bboyle is offline Offline
3 posts
since Jul 2003
Jul 8th, 2003
0

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.

HTML and CSS Syntax (Toggle Plain Text)
  1. <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.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Mar 9th, 2010
0
Re: Tab control on hidden input fields
Also setting the <input> attribute disabled="disabled" will cause the tab key to skip over this field. For visible fields some browsers will gray out the text and others do not. I have not tried this for hidden fields.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hoffman408 is offline Offline
1 posts
since Mar 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: whole div as hyperlink not working
Next Thread in HTML and CSS Forum Timeline: Frameset Form Problem in IE





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC