Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2001
    Posts
    351

    Google > How do they do it?

    go to www.google.com and look at that text field. For me, the cursor is already blinking before I click is... How did they do it? I tried to figure it out, and I need to know for this chat script I'm making.


    Thanks!
    - Shawn

  2. #2
    Join Date
    Aug 2001
    Location
    Australia
    Posts
    468
    This is what does it::

    function sf(){document.f.q.focus();}

    then throw a call to that in the onload......(and obviously rename to match your own form fields
    --

  3. #3
    Join Date
    Nov 2001
    Posts
    857
    This is how they did it.
    They named their form f like this <form name="f"> and they named that particular input field q like this <input name="q">

    In the header they defined this function as javascript:
    <script>
    function sf(){document.f.q.focus();}
    </script>

    Then they called that function when the page loads by placeing the following in the body tag:
    OnLoad=sf()

    I hope that helps.

    Regards,
    Micheal

    EDIT: I see 21inchguns posted just before me...
    <?
    header("Location: http://www.hostevolve.com/");
    ?>

  4. #4
    Join Date
    Nov 2001
    Location
    California
    Posts
    1,991
    JavaScript

  5. #5
    Join Date
    Feb 2002
    Location
    San Diego CA
    Posts
    1,478
    You can try taking a peek at the source code from View>Source
    ;-)
    What you can do with Cpanel ------------------> |||||
    What you can do with Cpanel XP+CpanelAPP -------> ||||||||||||||||||||||||||||||||||||||||

    Your competitors are cashing in with Cpanel XP & CpanelAPP, are you?

  6. #6
    Join Date
    Mar 2001
    Posts
    351
    Thanks so much guys! I really appreciate it
    And yes, I did look at the source, hehe

Posting Permissions

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