Back to JS main page

BY:Mickey Nardo...Homepage
DATE:1997-03-30




websight2

COMMENTS FROM THE AUTHOR:

WEBSIGHT is a web page stored in your computer as the home page for your Netscape 3.0+ browser. WEBSIGHT is a complete client-side search utility that uses the same search syntax for each of the nine major web search engines, allowing a filtered search on the five engines that support this feature. WEBSIGHT has convenient controls for the Netscape Bookmark and Address Book files, and will hold up to ten selected sites in the dropdown list. You can customize the features of the pop-up windows that display WEBSIGHT's results as well as the list of frequently visited url's. There's a constant date and time display. Finally, you can browse your hard disk, displaying appropriate files in the browser. WEBSIGHT is written in HTML with a full implementation of JavaScript (it will not run in Netscape 2.0 or the Microsoft Internet Explorer!). See Installing WEBSIGHT at the end of this file.

Syntax: Each of the web search engines uses its own syntax for the submitted search string. WEBSIGHT uses a single syntax for all of them - translating the entered string to the appropriate form prior to sending it. The WEBSIGHT syntax is the 'plus-minus' syntax introduced by Yahoo!, the first index. Enter the words you want included all in lower case, separated by spaces.

" " or ' ' ........ phrases: Surround words you want searched as a phrase with quotation marks. red apple will search for the words red and apple, not necessarily together. "red apple" will only find the words when they are used as a phrase.

+ ................. required: Words preceded by a plus must be included in the results. (WEBSIGHT assumes that the first word or phrase in a search string is required). "red apple" +inn +"new hampshire" would find inns named Red Apple in New Hampshire.

- ................ exluded: Words preceded by a minus must be excluded in the result. "red apple" +inn -"new hampshire" finds inns named Red Apple that are not in New Hampshire.

Remember, WEBSIGHT translates the string entered in the 'plus-minus' syntax into the format required by the selected search engine.

Search Engines: WEBSIGHT supports searches in the nine major search engines: Alta Vista, Excite, HotBot, Infoseek, Lycos, Magellan, Open Text, WebCrawler, and Yahoo!. You select the search engine from the drop-down list on the WEBSIGHT interface. In addition, five of the web search engines allow you to specify which part of the web page indices gets searched. They are Alta Vista, Infoseek, Lycos, Open Text and Yahoo!. This 'filter' is selected using the second drop- down list. Note that WEBSIGHT will automatically retain 'filter' information from engine to engine. WEBSIGHT can only filter globally. If you want to add a different filter for each word, you will have to go to the engine's site and use their syntax.

Results: When you click the [Search] button, WEBSIGHT returns the results of your query to a pop-up browser window that can be used just like the main Netscape window. You can configure the features of the pop-up window (see below in Configuring WEBSIGHT). Each engine returns the results in a slightly different format. You may use the pop-up window to explore the returned results, marking sights you want to retain with Bookmarks (ctrl-D). Remember to close the pop-up browser window prior to another search! (Note: If you click [Search] when the textbox is empty, WEBSIGHT brings up the page provided by the selected engine, and you can enter your search using their syntax).

The WEBSIGHT utilities: WEBSIGHT has several 'convenience' buttons. One brings up the Bookmark.htm file. One brings up the Address.htm file. The [Directory] button brings up the root directory of your hard disk which can be browsed. Many of the files in your computer can be viewed in your browser - notabely, htm or html files. The drop-down list at the bottom of the page holds up to ten url's that you've entered specifically. See below for ways to use this feature.

Configuring WEBSIGHT: The [Configure] button pops up a window that: 1. Allows you to configure the browser window used by WEBSIGHT.
Menu Bar: You can leave this off and set Bookmarks with ctrl-D.
Tool Bar: Useful for the [Back] and [Forward] buttons.
Directory Bar: Not needed.
Location: To see where you are.
Resizable: Not necessary.
Scroll Bars: So you can see the whole page.
Status Bar: Optional. Shows loading information.
Full Screen: Convenient, but you need to remember to close the window prior to the next search.


2. Lets you enter the name and url for ten user-defined sites shown in the drop-down listbox at the bottom of the interface. You can enter url's anywhere on the Internet or in your own computer. The real reason I included this option is my own sense of the limitations of Netscape's Bookmark option. If you look into the Bookmark interface, you'll find that you can create any number of Bookmark files by using the Import From and Save As options. I added this drop-down list so I could have easy access to my created Bookmark files on various topics. to access a url in your computer, use the notation: file://localhost/c:/netscape/navigator/websight.htm. The configuration options are stored as 'cookies' in the cookie.txt file.

Installing WEBSIGHT: WEBSIGHT.HTM must go in the same subdirectory in your computer that has the file BOOKMARK.HTM. It is somewhere along the path C:\...\Netscape\Navigator\Program. After copying the file to the subdirectory, there are several options that you need to set in Netscape 3.0:

Required:

1. Set WEBSIGHT as the Home Page for Netscape:
In Options.General_Preferances.Appearance.Start_Browser_With.Home_Page set the correct path for WEBSIGHT. If it is in C:\Netscape\Navigator, set the value to file://localhost/c:/netscape/navigator/websight.htm .

2. Set the browser to JavaScript Enabled:
Set Options.Network_Preferences.Languages.Enable_JavaScript to CHECKED.

Optional:

1. Turn off the directory button:
Set Options.Show_Directory_Buttons to UNCHECKED.

2. Set the toolbar to text only:
Set Options.General_Preferences.Appearance.Show_Main_Toolbar_As to TEXT.

3. Turn off the 'cookie' alert:
Set Options.Network_Preferences.Protocols.Show_Alert_Before to Accepting_a_Cookie UNCHECKED.

WEBSITES Secrets:
These changes can be made easily in the code of WEBSITE.HTM ...
Line 12:
var numSites = 10;
Change this variable to set the maximum number of sites in the drop-down list.

Line 846 & 848:
<body BGCOLOR='#C2BFA5' ...
<br><br><center><table border=10 cellspacing=7 BGCOLOR='#C2BFA5' ...

Change the value of BGCOLOR in both places to change the background color of the page. You can use hexadecimal RGB values as above or color words: "white" "lightgrey" "lightyellow" "lightblue" "palegreen" "pink" "paleviolet" "oldlace" "ivory" "linen"

Line 884 to 891:
<tr>&l;ttd align='center'><input type='button' name='address' value='Addresses' onClick="goURL('address.htm')"></td>
<td align='center'><input type='button' name='bookmark' value='Bookmarks' onClick="goURL('bookmark.htm')"></td>
<td align='center'><input type='button' name='configure' value='Configure' onClick="setVar()"></td>
<td align='center'><input type='button' name='directory' value='Directory' onClick="goURL('file://localhost/c:/')"></td></tr>


To remove the Bookmarks and Address Book buttons, replace the lines above with:
<tr><td align='center' colspan=2><input type='button' name='configure' value='Configure' onClick="setVar()"></td> <td align='center' colspan=2><input type='button' name='directory' value='Directory' onClick="goURL('file://localhost/c:/')"></td></tr> websight copyright 1997 by Nardo.SYS Inc. is released to the public domain for individual users without reservation. Corporate users please contact the author at jnardo@onramp.net.

Mickey Nardo April 1997
If you want this script just choose "Save Frame As..." (in Netscape) when you have the focus on the frame.

URL: http://www.oocities.org/SiliconValley/7116/jv_websi.html