The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

JavaScript: Google Focus

RhinoRhino TheRhinLOLRegistered User regular
edited October 2007 in Help / Advice Forum
If you go to google.com, it puts your cursor into the search box.

I think they do this with some type of Javascript, "focus" function.

Anyone know a quick and dirty way to do this? I have a "home page" for my browser with a google search (among other things) and would like to 'snap' the mouse onto the search box.

That way, when I open the internets I can just start typing and mashing the keyboard without pointing and clicking around.

93mb4.jpg
Rhino on

Posts

  • RhinoRhino TheRhinLOL Registered User regular
    edited October 2007
    Disregard, found it! :)

    <head>
    <script type="text/javascript">
    function sf() {
    document.formName.elmentName.focus();
    }
    </script>
    </head>

    <body onload="sf();">

    Rhino on
    93mb4.jpg
Sign In or Register to comment.