Results 1 to 3 of 3

Thread: Google Search

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    Upstate NY
    Posts
    210

    Google Search

    Hello, I am trying to add a Google Search to my page and i have the following code:
    Code:
    <form name="f">
    <input maxLength=256 size=15 name=q value="">
    <input type=submit value="Search" name=btnG> 
    <input type=reset value="Clear">
    </form>
    
    <script language="JavaScript">
    function Go()
    {
    var b="http://www.google.com/search?q="+escape(document.f.q.value)+"&btnG=Google+Search";
    a=window.open(b,"Search Google","dependent=0,location=0");
    }
    Whenever I type something in the search results load in the current frame, can anyone tell me how to make them load into a different frame, or a whole new window?

    George
    < o >

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    <input type=submit value="Search" name=btnG onclick="javascript:Go()">


    ?

  3. #3
    Hyperactive Member progressive's Avatar
    Join Date
    Sep 2001
    Location
    Manchester, UK
    Posts
    404
    The below will open google search in a new window.
    No need for javascript!

    Code:
    <form name="f" method="get" action="http://www.google.com/search?" target="_blank">
    <input maxLength=256 size=15 name=q value="">
    <input type=submit value="submit" name=submit> 
    <input type=reset value="Clear">
    </form>

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