SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast Vman's Avatar
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Selecting a link on page load

    Does anyone know how to have a link highlighted/selected (with the dots around it) in Internet explorer when the page loads?

    Basically I have a page with a few links on it (no form items) and the users want the page to be navigable(sp?) via the keyboard.

    When the page loads I want it to already be at a certain link so that they can they hit enter to click on it or tab to the next link.

    Any help much appreciated.

  2. #2
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:
    <html>
    <head>
    <title>Focus on First Link Test</title>
    <SCRIPT LANGUAGE="JavaScript">
    </SCRIPT>
    </head>
    <body onLoad="document.links[0].focus()">
    <A HREF="page1.html">Page One</A>
    <BR><BR><BR>
    <A HREF="page2.html">Page Two</A>
    <BR><BR><BR>
    <A HREF="page3.html">Page Three</A>

    </body>
    </html>

    This works in IE6.0 and NS6.0, but not NS4.7.

  3. #3
    SitePoint Enthusiast Vman's Avatar
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Thanks

    Many thanks requestcode.

    That code worked perfectly


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •