Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Upon clicking of Tab, focus goes to address bar...

Posted on 2004-10-05
5
Medium Priority
?
839 Views
Last Modified: 2010-05-18
Hi Experts,

I am trying to control the tab key to go to the next textbox...    

However as I focus on my first textbox during OnLoad and then press Tab key, instead of going to my 2nd textbox, it goes to the address bar...

May I ask how to solve this...?   A sample code would be best...


Thanks in advance experts...!   =)
0
Comment
Question by:aris_datuin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 12224624
Hi aris_datuin,

Have this:

<input type="text" tabindex="2"> for your second text box, although it should work without that...  

Regards,
Zyloch
0
 

Author Comment

by:aris_datuin
ID: 12224810
Also, I have another dillemma on how to control th F3 key so that it can call a javascript fuction anytime...   Right now, I have onKeyPressed on my first textbox...   But if the focus is on another object, it is not working unless I also put onKeyPressed on all of my objects...   However, if none of my objects is in focus, how will I control the F3 key...?

Thanks in advance again...!   =)
0
 
LVL 36

Accepted Solution

by:
Zyloch earned 200 total points
ID: 12225226
Do something like this:

document.onkeyup=handleFT;

function handleFT(e) {
   var key=(window.event)?window.event.keyCode:e.which;
   if (key==114) {//If F3
      //Do this
   }
}
0
 

Expert Comment

by:payalpr2002
ID: 12225759
have u used "document.onkeydown" event & "focus()" function in javascript ?
0
 

Author Comment

by:aris_datuin
ID: 12236841
It is working now...!    Thanks...   =)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

618 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