views:

20

answers:

2

Hi

I have a set of text boxes and html editors in my form. I am not able to set the proper tab index. The tab index moves from the first text box and skips all the controls in between and reaches the last html editor and the third tab takes me to the address bar and then it moves randomly all over the controls.

I now want to remove the tab index for all controls and then assign the index in a sequence programatically.

Please suggest ASAP.

Thanks in Advance

A: 

You can manually assign tab indexes on your controls. There is no need to remove the tab indexes from anything else. Just start with the control you want to be first, give it a TabIndex of 1, and move down the list.

Goblyn27
A: 

Hmmm you could use javascript on body load perhaps:

var textbox = document.getElementById("textbox");

//removing a attribute such as tabindex
textbox.removeAttribute("tabindex");

with jQuery:

$(document).ready(function() { $("textbox").removeAttr('tabindex'); }

in .NET I think you could use Page_Load in your HtmlControl (textbox with runat=server)

textbox.Attributes.Remove("tabindex");
Junior Mayhé