JavaScript
Search Engine

Site Map

Home
Example Site
Simplified
Advanced
Create Index
Using Wizard
Editing Code
search.html
Configuration
Search This Site
Conditions of Use
Contact
E-mail

 

 

Click here for important news about the JavaScript Search Engine

There are three stages to using the JavaScript Search Engine on your site.
Note that Search Maker Pro does these three stages for you.

Step 1 - Get the Template search.html file

The search.html file will contain both the index and the code that will enable people to search your site.  You simply need to place this file on your site and link to it to provide search facilities.

There are many ways to download the file. You can right click it (Windows) or keep the mouse pressed (Macintosh) and select the option to download the file. Alternatively you could look at  the file by clicking on it and "view the source".


Step 2 - Index each page

For the search engine to work you must create a line of code that will be an index for each page.

The Form Wizard will create the line of code for you.  It is recommended you use this as it effectively strips out the text from image rich web pages.

If you would rather edit the code by hand then please refer to the Edit Code page.

Each line of code will look like this:

page[1]=["http://www.server.com/somepage.html","Page title", etc...


Step 3 - Change the search.html template

You will need to create one line of code for each page.  You must add each line of code to the template search.html file.  For instance if you have three pages indexed your search.html should look like this:
<HTML>
<HEAD>
<SCRIPT language=JavaScript>
<!--
page=new Array()

//
//    See www.javascript.freeuk.com for details.
//
//    Enter your page indexes here.
//    Each page must be on one line only and be numbered consecutively.
//

page[1]=["http://www.myserver.com/index.html","Home Page etc..
page[2]=["http://www.myserver.com/info.html","Info Page etc..
page[3]=["http://www.myserver.com/link.html","Link Page etc..


Notes

The lines of code can be very wide!  Make sure that each page[] index is on one line only or the JavaScript will not work.  Many applications, such as Wordpad in Windows may wrap the line when viewing the code. This is fine.

If you use relative links on your site (most sites do) then you will be able to test the search engine offline, although the links will point to sites on the Internet.