Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Search Engine ( i have code in html but not in asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

SalmanKhana
Average Member

USA
961 Posts

Posted - 16 June 2001 :  04:38:20  Show Profile
hey guyz,

I got this java script code to implement/add a search bar to the html page that searches for keywords entered on engines like yahoo n all . but that code on that site was in html and it had 2 parts, one to be put in head and one in body of html.

But now this forums page is in asp and when i try putting it inside it, it gives errors.

Following is the code I am trying to put. Help me out guyz plz .. Appreciate your help !

---------------------------



<!-- TWO STEPS TO INSTALL SEARCH BOX:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function searchFunc() {
var newWindow = window.open("about:blank", "searchValue", "width=200, height=200, resizable=no, maximizable=no");
var searchValue = document.search.queryField.value;
var yahooSearch = document.search.yahoo.value;
var altavistaSearch = document.search.altavista.value;
var webcrawlerSearch = document.search.webcrawler.value;
var exciteSearch = document.search.excite.value;
newWindow.document.write("<html>\n<head>\n<title>Select Seach Engine</title>\n</head>");
newWindow.document.write("<body>\n");
newWindow.document.write("<a href='" + yahooSearch + searchValue + "' target = 'main'>Yahoo!</a><br><br>\n");
newWindow.document.write("<a href='" + altavistaSearch + searchValue + "' target = 'main'>Altavista</a><br><br>\n");
newWindow.document.write("<a href='" + webcrawlerSearch + searchValue + "' target = 'main'>WebCrawler</a><br><br>\n");
newWindow.document.write("<a href='" + exciteSearch + searchValue + "' target = 'main'>Excite</a><br><br>\n");
newWindow.document.close();
self.name = "main";
}
// End -->
</script>

</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<form name=search>
<input type=hidden name=yahoo value="http://search.yahoo.com/search?p=">
<input type=hidden name=altavista value="http://www.altavista.com/cgi-bin/query?pg=q&what=web&fmt=.&q=">
<input type=hidden name=webcrawler value="http://www.webcrawler.com/cgi-bin/WebQuery?searchText=">
<input type=hidden name=excite value="http://www.excite.com/search.gw?trace=a&search=">
Search the internet for:
<input type=text size=25 name=queryField>
<br>
<input type=button value="Search" onClick="searchFunc()">
<input type=reset value="Clear">
<br>
(A separate window will open where you can select a search engine.)
</form>

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 2.49 KB -->

  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07