|
Getting Started
- Place the program files (Searchlight.jar, Searchlight.cab, rySearchlight.class and rySearch.class) in the directory containing the HTML document into which you want to insert the applet (or into a different directory, and add the correct CODEBASE= attribute to the applet tag given below).
- Add the following applet tag to your HTML document in the position you want Searchlight to appear:
<APPLET CODE="rySearchlight.class" ARCHIVE="Searchlight.jar" WIDTH=200 HEIGHT=250>
<param name=CabBase value="Searchlight.cab">
<param name=Copyright value="Searchlight (c) 1997 Cool Focus [www.coolfocus.com]">
<param name=ShowShortURLS value="yes">
<param name=Target value="_top">
<!-- Option #1: specify a single file containing the text of the pages to be searched -->
<param name=SingleSearch value="master.htm">
<param name=SSMaxLines value="2000">
<param name=SSMaxURLs value="100">
<!-- Option #2: specify each document to be searched individually -->
<param name=URL1 value="intro.htm">
<param name=Name1 value="Searchlight Overview">
<param name=URL2 value="javabasics.htm">
<param name=Name2 value="Java Applet Basics">
<param name=URL3 value="getstarted.htm">
<param name=Name3 value="Getting Started">
<param name=URL4 value="params.htm">
<param name=Name4 value="Searchlight Parameters">
<param name=URL5 value="trouble.htm">
<param name=Name5 value="Troubleshooting">
<param name=URL6 value="feedback.htm">
<param name=Name6 value="Contacting Cool Focus">
</APPLET>
- Save the document and open it in your browser. Provided the class files are located where you have specified in the tag and parameter, Searchlight will start. Initially, Searchlight will appear 'grayed-out' while it reads the documents at the URLs specified in the URL parameters - during this time, a 'percentage complete' figure will appear in the browser status bar.
- Searchlight requires a space of fixed size on the page: width=200, height=250. If you reduce these figures, parts of the applet will not be visible.
- Change the URL and Name parameters given in this example to those you want to use (adding as many as you need), and adjust the first two parameters as necessary. Details of all parameters are given in The Parameters Explained.
Note that the more URL parameters you use (and the more text each referenced file contains) the longer Searchlight will take to carry out its initial processing. Using Option #1 rather than Option #2 cuts this time dramatically, with the added bonus that the single file can be cached in advance of being needed, although this requires a little more space on your web server.
|