Results 1 to 4 of 4

Thread: Hyperlink - Easy one

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Somerset, UK
    Posts
    93

    Thumbs up Hyperlink - Easy one

    How do you set focus to a hyperlink when web page opens??

  2. #2
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    mate, i dont think it is possible but if it is then cool

  3. #3
    New Member
    Join Date
    Apr 2001
    Location
    Dublin/Ireland
    Posts
    15
    i think thats impossible, you have to click on a hyperlink you cannot focus like you can on a text box. as below
    document.LoginForm.Username.focus();

    sorry about that mate,
    if you hear differently then respect to who ever figures it out.

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    umm.... of course it's possible... same way you would do it to any other element:

    Code:
    <HTML>
    <HEAD>
    <SCRIPT language=javascript>
    function window_onload()
    {
    	MyLink.focus();
    }
    </SCRIPT>
    </HEAD>
    <BODY onload="window_onload()">
    <A name=MyLink id=MyLink HREF="Home.htm">Click Here</A>
    </BODY>
    </HTML>
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

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



Click Here to Expand Forum to Full Width