Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3317088
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:32:47+00:00 2026-05-17T22:32:47+00:00

Hey, just a quick question, I was using the focus function on elements and

  • 0

Hey, just a quick question, I was using the focus function on elements and it seemed to be working fine because it was working in IE7, IE8 and all of the good browsers. When I tried it in IE6…nothing. It is a very basic line.

element.focus();

VERY basic. So does IE6 have a bug or problem with this function? I know the element object exists, I have tested for all of that and it works in all other browsers.

Thanks for any help you can give.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:32:47+00:00Added an answer on May 17, 2026 at 10:32 pm

    Are you creating the <input> element dynamically? Stackoverflow might already have the answer.

    Update

    Running Windows XP SP3 with IE6, I wasn’t able to duplicate the issue you describe with the following file:

    <html>
    <head>
    <script type="text/javascript">
    function body_load() {
      document.getElementById("field2").focus(); }
    </script>
    </head>
    <body onload="body_load();">
    <input type="text" id="field1"/>
    <input type="text" id="field2"/>
    </body>
    </html>
    

    It always put focus on field2 as expected. The following file works as expected too:

    <html>
    <body>
    <input type="text" id="field1"/>
    <input type="text" id="field2"/>
    <script type="text/javascript">
      document.getElementById("field2").focus();
    </script>
    </body>
    </html>
    

    Are you using application/javascript as the type for your <script>? I know IE6 has issues with that. Perhaps posting an example that can duplicate the issue will help determine why it’s not working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, just a quick question (should be an easy fix I think). In
Hey just a quick question for any experts out there. I have a site
Hey guys just a quick question, I am posting mp3s in dialog boxes each
Hey gang. I have just written a client and server in C++ using sys/socket.
Hey everyone, I'm using Virtual PC and working with a virtual hard disk (*.vhd)
Hey all. Newbie question time. I'm trying to setup JMXQuery to connect to my
Hey guys, quick question, I have an id that is applied multiple times on
Hey guys, quick question for any experts out there. I am allowing users to
Hey guys quick question. I have a div that gets assigned a number to
Hey guys quick question, I currently have an insert statement $query= INSERT into new_mail

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.