JavaScript Indexer and Search Engine
Description:
On servers which don't admit server-side scripts (PHP/ASP/etc..) if you wish to add a search engine you have 2 options:
-To use a dedicated external engine.
-Or to use a script that runs on client side.
The second option has the advantage that you can use the search engine offline (on html help, tutorials, etc..).
JavaScripts cannot search through directories on the server, so you must make a file which contains a database with the words you like to be searched for.
I made a console program (JavaScript Indexer) which scans a specified directory and all subdirectories for "*.htm*" and "*.txt" files and automatically indexes the web site, creating a database on a js file.
It writes the search function into the same file. So all you have to do is to add few lines to the web page and you have your search engine running. These lines are:

Add this line in the HEAD section of the html (just after <HEAD>):

.
<script language="JavaScript" type="text/javascript" SRC="search.js"></script>

And these lines where you want to add the input box:

.
<form name="JF1" action="javascript:FND(document.JF1.JT1.value)">
<input type="text" name="JT1" size=25>
<input type="submit" value="Search!">
</form>

You can paste this code into your page. The ".js" file is the file created by the program. This file must be added on server.

Sample:
You can test it on my page. Type a common word on the input box on the top of the page and click the Search! button or press Enter. To see multiframe example click here. For a sitemap generated from database click here.

Requirements and compatibility:
Microsoft Windows 9x, NT, Me, 2000, XP for jsind.exe
The script theoretically works with these browsers:
Internet Explorer 4 to 6
Netscape Navigator 4 to 7
But the the reality is different. It was tested with these browsers:

Browser Version Compatibility Same window New window Multiframe
Internet Explorer 6.0 100% Yes Yes Yes
Internet Explorer 5.0 95% Yes Yes Yes
Internet Explorer 3.0 0% No No No
Opera 7.0 95% Yes Yes Yes
Mozilla 1.2.1 95% Yes Yes Yes
Netscape Navigator 7.01 95% Yes Yes Yes
Netscape Navigator 6.1 95% Yes Yes Yes
Netscape Navigator 4.51 0% No No No

Same window, new window or Multiframe window is the window which will display the search results.

Screenshot:

Performance:
The main drawback is that the program is slow with big files. A 150k file containing a big table is processed in up to 20 seconds. In return the script runs faster with fewer big files. A database of 550 pages and 3.5MB is searched in approx. 40-60 seconds. An average web site is searched in maximum 5-10 seconds. For small sites (smaller then 25 pages) and low speed connections this engine is faster then a PHP/ASP version because the database is loaded with the page and the engine generates the result on the client browser. The search speed is processor power dependent. The information above is obtained on my old AMD K6-2@500MHz. On a faster PC the search speed is greater.

Customization:
You can customize the look of the generated result page by editing the default.inc which comes with the program or by creating another inc file and by editing the jsind.ini.

License:
This program is FREEWARE.

News:
New version v1.15.01 is ready (04 Mar 2003). Take a look at readme.txt to see what's new.

Languages:

  • English
  • French 95% by Guy Vachon
  • Rumanian
  • Dutch by Jeroen Feelders
  • Italian by paolo.miani@email.it
  • Croatian by mat

    Download qui oppure v.sotto
       jsind.zip - 81k
       jsind-src.zip - 12k Delphi 6 source files
  • Il freeware è riservato ai Cittadini di
    Se non lo sei ancora, clikka per leggere i dettagli
    Quando esce il form, inserisci Id e Password
    Ti ricordiamo anche che nessuna comunità vive se tutti i suoi membri si limitano a prendere. Psicopolis si basa sullo scambio, quindi ogni tanto dai un tuo contributo: NON SOLDI ma un intervento sulle bacheche, oppure qualche materiale utile o una segnalazione interessante.
    Attenzione, se trovi il server occupato, riprova in orari diversi. Se hai difficoltà a scaricare o ricevi un file corrotto, . Ogni programma è stato controllato con antivirus, ma Psicopolis non risponde del funzionamento del software, che è reperito in rete.