Solved

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

Posted on 2004-10-05
5
812 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 …
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

695 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