PDA

View Full Version : Tabbing through only text fields


NRastogi
10-29-2002, 04:31 PM
Hi guys,

Please help me out in giving any ideas or solution to the following problem.

I have this table haiving 1 to n number of rows (set dynamically could be from 8 to 30). Each row has 4 columns.
Column 1 contains a link to some page, Column 2 is a Quantity field, Coulmn 3 is a description display, column 4 displays unit of measure, column 5 is again a link to some page.

Right now, if I tab through the fields, it goes to Col1, Col2, and then Col 5.

I just want to tab through the quantity field. The name of the quantity is field is a Product number, which could not easily be used to find out the next widget.

Please suggest me the easiest and quickest way to this problem.

I appreciate your time and help in advance.

Regards,
NRastogi

beetle
10-29-2002, 05:08 PM
the tabindex property will mostlikley work for you, provided all you inputs are withing a form (and I'm assuming they are)

<input tabindex="1" />
<input tabindex="2" />
<input tabindex="3" />
<input tabindex="4" />

etc etc....just add it and the respective index to any element within the form

NRastogi
10-29-2002, 05:15 PM
Thanks a lot for the suggestion.

I added the tabindex="1" for quantity field. It kinda did work.

But, as soon as I tab through the last field, the control goes to the other fields and images on the pages.

I just want to use the tab for quantity field. So, as soon as it leave the last text field, the focus should go to the first text field.

Please let me know how could I solve this.

Thanks,
NRastogi

beetle
10-29-2002, 05:44 PM
Uhh, I don't think you can. Using the TAB key is the only way people without a mouse can navigate a web page (or alot of Windows for that matter)

It behaves that way for a reason.

pizzaguy
10-29-2002, 07:18 PM
Use tabindex = "-1" for those fields that you want to skip. This way you don't need to care about the tab order.

beetle
10-29-2002, 07:31 PM
Nice one, pizzaguy. I should have consulted my reference (http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/tabindex.asp) :D