<SCRIPT LANGUAGE="_JavaScript">
/*INSTRUCTIONS:
Ok, this is the setup and its quite simple to figure out if you know JS or any other type
of scripting language. First off in the ARRAYs you write in the HTML page, the path of the
site (which can be left blank), a description to what the link is, the keywords entered for
the search criteria, and finaly the description to what the link is about. (IF CONFUSED JUST RUN THE SCRIPT THE WAY IT IS FIRST AND SEE THE RESULTS! OR, JUST EMAIL ME BACK AND I'LL EXPLAIN)
*/
var item = new Array();
Km=0; item[Km]=new Array("hotmail.com","
//YOU CAN EDIT WHAT THE NEW WINDOW WILL LOOK LIKE, SUCH AS TEXT COLOR, BACKGROUND COLOR, LINK COLOR.
pageview="<html><head><title>Search Results</title></head><body bgcolor='black' text='white' link='#bda940' vlink='#cccccc'><left><table border=0 width=200>";
}
/* This function is important. Here you actualy show what the search result window display.
DO NOT EDIT HERE. ONLY EDIT IF YOU KNOW WHAT YOU ARE DOING.
*/
function show(which,dniw,num) {
link = item[which][1] + item[which][0];
//If you want to you can change the 'target' to anything.
line = "<tr><td><a href="+link+" target='_new'>"+item[which][2]+"</a><br>";
line += item[which][4] + "<br><br></td></tr>";
/* By adding this tag: <br>"+link+" between the: + " on the above line you will display the
link in text well.
*/
dniw.document.write(line);
return true;
}
</script>
</HEAD>
<BODY bgcolor="#000000" text="bda94c">
<center>
<!--- leave the 'form method' line the way it is. ALL OF IT -->
<form method=get action="_javascript:void(0)" onfiltered="search(this); return false;">
<tr><td>
<p><b><font color="ff0000">to see it in action type in:</font> </b></p>
<p>'all' to see all the search results. <i>Without the single quotes.</i><br>
'hotmail' to see the search result for that key word.<br>
You can also enter part of a word and the result will bring back the
entry. <i>Try entering: 'ail' and see what happens.</i><br>
</p>
<p> This script also has the <b>.toLowerCase()</b> so that it convert
all the search words to lowercase. In other words, this script is NOT
case sensitive!! So if you enter in HOTMAIL or hotMAil or hotMAIl,
you still get the right result.</p>
<p><i> Just makes sure that all the keywords are in lowercase in the Array
sction at the top...</i></p>
<p>NS and IE display it differently, <i>BUT IT WORKS IN BOTH BROWSERS!!
</i>For a cooler effect use CSS for the textbox and buttons, like
I did. ( Just a note that NS4 will not display the CSS tags)</p>
<p><b>PLEASE LEAVE MY AUTHORSHIP IN THE SCRIPT THANKS.</b></p>
<p>
<input type=text name=searchvalue value="">
<input onfiltered='blur();' type=submit value="Search" style="background-color:#004080; border-color:#004080; color:#FFFFFF;" name="Input">
</p>
</td>
</tr>
</form>
</center>
</body>
</html>
To put a search facility in your site you have have two basic approaches...
1) Get a third party to index your site and host a search facility for it. You have to pay for this service, either in cash or by letting the third party put adverts among your results. The URLs posted by Edward and Babel are examples of this,
is another popular one. The advantage of doing it this way is that it's quick and easy, the disadvantage is that you have less control.
2) Use a program hosted on your site to do the searching. You can pay pots of money for such programs from commercial suppliers (such as Google), or you can get cheaper (or free!) shareware solutions. A good place to start looking for the latter is
If you're looking for guidance on building your own, I suggest you download a few free scripts and dissect them in your favourite editor. That's what I did when building mine! -- Chris Hunt
Extra Connections Ltd
The link I posted is just an example of how Google does it. Obviously, it's free to submit your site to Google and you can tailor a query (from your website!) to Google to return only results in your domain. This is practically the same thing as, oh, a custom searcher on your site.
One of the options on that page is setting up a free service to search your site. I recommend always investigating things that are
* free
* used often by lots of people
* easy to implement
* effective as hell
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.