Problem with Tabbing order

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I have no tabbing orders set on my pages and use just the default order,
except when I change the order using focus()

I have a page where I am hiding a section of the page (asp:panel
visible=false) and doing a Focus to go to the first textbox of my contact
information which happens to be the users First Name. Tabbing from my First
Name should go to the Middle Name. But it doesn't. It goes to the URL
address box of the Browser.

When I select the Middle Name with my mouse, everthing works fine and it
tabs as expected.

In my code, I have the following:

a = CType(Page.FindControl("myBody"),htmlControl)
a.Attributes.Add("onload","GetFocus('_ctl0__ctl1_ContactInfo_objFirstName')")

The GetFocus code goes like this:

function GetFocus(a)
{
if (document.getElementById(a) != null)
{
document.getElementById(a).focus();
}
}

Why does it go to the URL line?

Thanks,

Tom
 
Also, if after I get to the First Name from the GetFocus routine, I then
select the First Name with my mouse - it works fine. Tabs right to the
Middle Name.

If GetFocus() gets me to the First Name and I enter data and tab or just
tab, it goes to the URL line.

Thanks,

Tom
 
One more thing.

This behavior only seems to happen in IE. It works fine in FireFox.

Thanks,

Tom
 
Back
Top