Problem with Tabbing order

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
 
T

tshad

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
 
T

tshad

One more thing.

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

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top