4 Replies - 12595 Views - Last Post: 19 July 2017 - 04:22 PM

#1 deadlypetal   User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 23-March 05

Serach engine

Posted 14 April 2005 - 03:18 AM

Description: THNX TO JAVAFILEFound it around the internet, it seems cool

<base target="leftframe">

<body BGCOLOR="#ffffff" link="#CC0033" vlink="#333399" alink="#FF0000" <!--content start-->

<p align="center"><img src="http://www.javafile.com/images/banner.GIF"
alt="banner.GIF (2826 bytes)"></p>

    <td WIDTH="100%">This script is for building your own website search engine! All you need
    to do is change the "keywords" and "url" in the source code and it
    will search your site locally...pretty cool! Best part is...it opens in a new
    "mini-window".<font FACE="ARIEL,HELVETICA" SIZE="-1"><p align="center"><script

    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] = "Visit The JavaFILE, the absolutely best Javascript site."
Address[1] = "http://www.javafile.com"

Keyword[2] = "free"
Descrip[2] = "Free banners, logo, fonts!"
Address[2] = "http://www.graphxisle.com"

Keyword[3] = "free"
Descrip[3] = "Free webservices at Bravenet."
Address[3] = "http://www.bravenet.com"

Keyword[4] = "free"
Descrip[4] = "Your site can go here!"
Address[4] = "http://www.yoursite.com"

    function checkDatabase() {

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

stats += 'scrollbars=yes,resizable=yes' 
MsgBox = window.open ("","msgWindow",stats) 
MsgBox.opener = window;
MsgBox.opener.name = "opener";
MsgBox.document.write("<head><title>Search Results</title></head>");
MsgBox.document.write ("<body bgcolor=white text=black link=blue vlink=darkblue alink=blue><H2><CENTER><font face=arial>Search Results</CENTER></H2>") 
MsgBox.document.write ("<font size=3><b><center>For the keyword:  "+Item+"</center><hr width=50%></b></font>");
        for (var i=1; i <= Keyword[0]; i++) {
        if(Item == Keyword[i]) {
          Found = true;
         MsgBox.document.write ("<li><font face=arial><font size=2><b>"+Descrip[i]+"<BR><A HREF="+Address[i]+" target='opener'>Click Here To Go There</A></font></font>") 

MsgBox.document.write ("<H4>Nothing Found</H4>")
// Leave the line below intact if you want to legally use this script
MsgBox.document.write ("<FORM><CENTER>") 
MsgBox.document.write ("<font size=2><font color=arial><INPUT type='button' value='Close' onclick = 'self.close()'></font></font>") 
MsgBox.document.write ("</CENTER></FORM>")
MsgBox.document.write ("<H6><small><small><small><b></b><font color=white><font face=arial><font size=1><font color=black>Originally created by Adam Allen 
© 1997 All Rights Reserved</font></font></small></small></small>")
// 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 as well, and not crap JAVA!
// Also a copyright notice MUST appear with the form.
    //    --> 

</script> </font><a
    href="http://www.javafile.com/javascripts/search/search3.zip"><font size="3">Download the
    Script</font></a><font FACE="ARIEL,HELVETICA" SIZE="-1"></p>
    <form NAME="form1">
      <b><div align="center"><center><p>Search for:</b>

      <input TYPE="text" NAME="searchfor" VALUE="Javascript" SIZE="20"><b><input type="button"
      value="Search" align="absmiddle" onclick="checkDatabase()"></b>


      <font face="Arial" size="2">To test this search engine, search for <strong>'Javascript'</strong>.</font></font>
<!--content stop-->

Is This A Good Question/Topic? 0
  • +

Replies To: Serach engine

#2 Pankaj rambadia(facebook)   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 28-January 11

Re: Serach engine

Posted 28 January 2011 - 02:18 AM

nice code
Was This Post Helpful? 0
  • +
  • -

#3 michaelwarne   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 26-December 16

Re: Serach engine

Posted 26 December 2016 - 03:21 AM


Thanks for sharing this code, this code will be helpful keep posting

This post has been edited by andrewsw: 26 December 2016 - 03:44 AM
Reason for edit:: Removed previous quote, just press REPLY

Was This Post Helpful? 0
  • +
  • -

#4 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6819
  • View blog
  • Posts: 28,246
  • Joined: 12-December 12

Re: Serach engine

Posted 26 December 2016 - 03:45 AM

There is no need to quote the original snippet, use the Reply button further down the page or the Fast Reply box.

Be aware that this code is very old and uses many tags and attributes that are obsolete, including omitting the required DOCTYPE declaration.
Was This Post Helpful? 0
  • +
  • -

#5 DADDYCARDONA   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 214
  • Joined: 04-July 10

Re: Serach engine

Posted 19 July 2017 - 04:22 PM

View Postandrewsw, on 26 December 2016 - 05:45 AM, said:

Be aware that this code is very old and uses many tags and attributes that are obsolete, including omitting the required DOCTYPE declaration.

so what would be the update to this?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1