|
-
Jan 20th, 2002, 05:28 PM
#1
Thread Starter
Addicted Member
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
-
Jan 21st, 2002, 02:54 AM
#2
Conquistador
<input type=submit value="Search" name=btnG onclick="javascript:Go()">
?
-
Jan 21st, 2002, 04:54 AM
#3
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|