Netscape Help Template

This page illustrates calling Netscape Help from HTML. Each of the buttons below corresponds to a help topic that might be used from a different page in an application.

Click on the buttons below to call the help window for various topics. In an actual application, these buttons would appear on different pages in the app.

Each button's onClick JavaScript event handler calls the NetHelp function with a string correspondig to the topic to display. For example,

<input type="button" name="Help" value="troubleshooting" onClick="NetHelp('troubleshooting')">

The NetHelp function then uses the topic string in its call to window.open that pops up the Help window with specified width, height, and other features, as follows:

function NetHelp(topic) {
   window.open("help.html#" + topic , "HelpWin",
   "toolbar=no,directories=no,menubar=no,status=no,scrollbar=no,
   resizable=yes,width=400,height=500")
}

The file help.html is a frameset file that then passes the topic on to the file helptopics.html, which contains the actual content of the online help. The following two lines of JavaScript define the variable topic based on the string following the pound sign (#) and generate the topic frame with an URL of the form helptopics.html#topic_name

topic = location.hash document.write("<frame src= helptopics.html" + topic + " name='topic'>") Each topic corresponds to a named anchor in the help topics file. Named anchors are defined in HTML as follows: <A NAME="topic_name">Heading</A>

where topic_name is the name of the topic (for example, "troubleshooting") and Heading is the heading or text it applies to.

So, when creating an intranet application, you should incorporate the NetHelp function in each page for which you want to provide online help. If you have many such pages, and you are using Navigator 3.0, you can use the SRC attribute of the SCRIPT tag to include the function definition in each page. For example, if you define NetHelp in a file called helpfun.js (and keep it in the doc directory below the app directory), then each page that uses help would include the following tag:

<SCRIPT SRC="doc/helpfun.js>

If users don't have Navigator 3.0, then you have to explicitly include the function definition in each page, since the SRC attribute of the SCRIPT tag is not implmented in Navigator 2.0.

Help Files

The files provided with this template are:

After modifying helptopics.html, contents.html, and index.html for your application, simply add help buttons to the appropriate pages of your application, as described above. Then copy all the files (except nethelp.html) to your application's doc directory. You do not need to compile the files with the LiveWire compiler: all the JavaScript is client-side JavaScript.