Search Engine For Your Site

[Total: 0    Average: 0/5]

This allows you to set up a search page for your information.

Body Code:

    <!-- Hide Script from Old Browsers

// Obviously the more enteries you have the more time it will take to
// load the document, but the seek time reamins very quick, I would
// say with about 500 entries you would be quicker than YAHOO!
// at least with this there are no CGI Scripts to load, once the main
// page is in that's it!!!!
// Define Database Options
    Keyword = new Object();
    Descrip = new Object();
    Address = new Object();

// Keyword[0] = n  (where n is the number of keywords which can be searched
Keyword[0] = 6

// Each entry is split into
// Keyword[n] = text (where text is the keyword of which the entry is to
// be searched by  (type Keywords in lowercase)
// Descrip[n] = text (where text is the description associated to this entry
// Address[n] = text (where text is the URL associated to the entry
//  n is the entry number.

Keyword[1] = "javascript"
Descrip[1] = "Javascript self help site."
Address[1] = ""

Keyword[2] = "yahoo"
Descrip[2] = "Search the BEST engine on the internet."
Address[2] = ""

Keyword[3] = "world"
Descrip[3] = "The world site."
Address[3] = ""

Keyword[4] = "free"
Descrip[4] = "Free webpages at Geocities."
Address[4] = ""

Keyword[5] = "free"
Descrip[5] = "Free webpages at Tripod"
Address[5] = ""

    function checkDatabase() {

      var Found = false
      var Item = document.forms[0].searchfor.value.toLowerCase();

stats += 'scrollbars=yes,resizable=yes' 
MsgBox = ("","msgWindow",stats) 
MsgBox.document.write("<head><title>Close this window to return to Adam's site</title></head>");
MsgBox.document.write ("<BODY><H2><CENTER>Search Results</CENTER></H2>") 
MsgBox.document.write ("<H3>For the keyword:  "+Item+"<HR>");
        for (var i=1; i <= Keyword[0]; i++) {
   if(Item == Keyword[i]) {
  Found = true;
 MsgBox.document.write ("<H4>"+Descrip[i]+"<BR><A HREF="+Address[i]+">Click Here To View</A></H4>") 

MsgBox.document.write ("<H4>Nothing Found</H4>") 
// Leave the line below intact if you want to legally use this script
MsgBox.document.write ("<H6>This script was created by Adam ALLEN 1997 All Rights Reserved<BR><A HREF=></A></H6>")
// There must be my notice above if you are to use this script legally.
// It took many hours work, fairs is fair, I just want that little line in
// and you get a fully working Search ENGINE, for FREE, on your site
// In Java Scripts aswell, and not crap JAVA!
// Also a copyright notice MUST appear with the form.
MsgBox.document.write ("<FORM><CENTER>") 
MsgBox.document.write ("<INPUT type='button' value='Close' onClick = 'self.close()'>") 
MsgBox.document.write ("</CENTER></FORM>")     }
    //    -->

    <FORM NAME="form1">
<B><U>Please Input Your Search Term</B></U> <FONT SIZE=1>Netscape 3.0 required</FONT><BR>
<INPUT TYPE="text" NAME="searchfor" VALUE="example" SIZE=20><INPUT TYPE="button" VALUE="Search the base." onClick="checkDatabase()"><BR>

Times Viewed: 81

Leave a Reply

Your email address will not be published. Required fields are marked *