Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

(ASP.NET) Preventing tab index from going to browser address bar ?

Posted on 2003-11-20
3
Medium Priority
?
3,112 Views
Last Modified: 2012-08-14
Hello,

I have a web form that tabs properly through the controls on my page. Problem is, after I tab through to the last control, the next thing to receive focus is the address bar in the browser. How can I prevent this from happening.

Thanks,
Mike
0
Comment
Question by:MichaelVB
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 180 total points
ID: 9794677
MichaelVB,
I'm afraid you can't do it in a web site application. Event in EE itself, you also can tab until to adress bar (can try it by yourself).
Adress bar also consider one of the TabIndex. Can't prevent it.

Regards
xcom
0
 
LVL 1

Assisted Solution

by:vknowles
vknowles earned 120 total points
ID: 9801562
Well, I haven't tried this, but let's say you did something like this:

Use the last control's onBlur event.

Find a way to determine whether the onBlur occurred because of a tab keypress.

If so, set focus to the first control in your tab sequence.

That might prevent the user from tabbing to the address bar.

Just a guess.

-Van
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9807918
MichaelVB,
TabIndex for address bar is "0" in Web Site.
If you set Tabindex is "0" for others control inside your web site, but, you still will get back to address bar after you tab from initial tabIndex as you defined in your first control. So, the conclusion is you cant prevent it.

Regards
x_com
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Screencast - Getting to Know the Pipeline
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question