This page describes how to put HelpIndex onto your web site. You may wish to consult our Getting Started guide as well.
Page Contents |
---|
Make your help index file |
Write your web page |
Parameters |
Example |
Mode parameter |
Index parameters |
CODEBASE |
Frames |
This index file contains a list of your URLs and the index entries which link to them. The index file is in a published format in case you need to know.
Most people start off by using the supplied MakeHelpIndex Java program to generate an index file from their existing web pages. This looks at your main page (eg index.html or default.htm) and follows all the appropriate links to generate the index file. Each page will usually have at least one index, ie the page's title. See MakeHelpIndex for full details of what indices are made.
Alternatively you could build you index file by hand. This is hard work. However you may wish to tweak the file produced by MakeHelpIndex (or -better- alter your HTML so that MakeHelpIndex produces the right indices automatically).
Important: If you change your index file then you will almost certainly need to stop and restart your browser, as it will have cached your previous index.
We hope to have a HelpIndex Workshop Windows program available soon. This will make buiding and editing your help index files much easier.
Make sure that you keep your help index up to date with your pages.
You need to add an APPLET tag with various parameters, as shown here.
You must specify the applet width and height; you may need to tweak these to allow room for large fonts or small displays.
Simple usage:
On web page |
<APPLET code=HelpIndex.class width=450 height=250> <PARAM NAME=index VALUE=siteindex.hi> <PARAM NAME=mode VALUE="applet wide"> Sorry, you need a browser that runs Java to see the Help Index. </APPLET> |
---|---|
Clickable icon |
<APPLET code=HelpIndex.class width=70 height=80> <PARAM NAME=index VALUE=siteindex.hi> <PARAM NAME=mode VALUE="icon wide"> Sorry, you need a browser that runs Java to see the Help Index. </APPLET> |
In many cases, you will want to use HelpIndex in conjunction with HTML frames - see below. You could have the help index in one frame and any found pages displayed in another. HelpIndex supports this technique using the Target parameter.
On your HelpIndex page, you might also like to have some instructions, and - if desired - some predefined links for top-rated indices.
For example, to make the background colour yellow, add
<PARAM NAME=bgcolour VALUE="yellow">
Parameter | Type | Description | Default | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BgColor BgColour |
RGB triplet or colour name | The background colour (above and below the tab cards) | white | ||||||||
![]() |
RGB triplet or colour name | The background colour of the cards, ie the main background. | Light gray | ||||||||
FgColor FgColour |
RGB triplet or colour name | The foreground colour | black | ||||||||
fieldbgcolor | RGB triplet or colour name | The background colour of fields. | BgColor | ||||||||
font | Font definition | The font used in the form | Dialog 12pt | ||||||||
icon | string | The icon URL, relative to the code base | helpindex.gif | ||||||||
iconbgcolor | RGB triplet or colour name | The applet background colour in icon mode. | BgColor | ||||||||
* index | string | The index file URL, relative to the document base | none | ||||||||
![]() |
C style string of up to five comma-separated strings. |
See below
|
none | ||||||||
indexlines | integer, >= 1 | The number of lines in the Indices list box | 4 | ||||||||
* language | string | The language file URL, relative to the code base | none defaults to English |
||||||||
minquerylength | integer, >= 0 |
The minimum length of the query text before lookups occur. A bit unnecessary as lookups have a separate thread, see above. If non-zero, please include instructions in your web page. |
0 | ||||||||
mode | string |
One of "applet" or "icon", and one of "wide" or "high"
|
applet wide
|
||||||||
pagelines | integer, >= 1 | The number of lines in the Pages list box | 2 | ||||||||
* query | C style string | The initial query | none | ||||||||
target | string |
The target frame The following frame names have special meaning:
|
"_self" |
* These parameters should only be used in version 1. The version 2 index<N> parameters offer the same functionality. |
<APPLET code=HelpIndex width=100% height=90% alt="HelpIndex site index"> <param name=mode value="applet high"> <param name=index value="helpindex.hi"> <param name=index1 value="helpindex.hi"> <param name=index2 value="phd.hi"> <param name=index3 value="webdes.hi,,,index.html"> <param name=index4 value="webdesfr.hi,french2.hil"> <param name=index5 value="JDKAPI.hi,,index sort,,class java."> <param name=index6 value="dbex.hi,dbex2.hil,index nocontents"> <param name=index7 value="helpindex.hi,french2.hil"> <param name=index8 value="helpindex.hi,german2.hil"> <param name=iconbgcolor value="#FFFFC0"> <param name=fgcolour value=blue> <param name=bgcolour value=#FFFFC0> <param name=fieldbgcolor value=white> <param name=cardbgcolor value=lightgray> <param name=pagelines value=3> <param name=target value="Main"> Please use a Java enabled browser. <META HTTP-EQUIV="REFRESH" CONTENT="0; URL=contents.html"> </APPLET>
In "icon" mode, the applet appears as an icon initially.
The user must click anywhere on the applet space, ie on the icon,
to show the help index form in a new window.
The window is resized to fit the form.
Note that the default icon - helpindex.gif - is 70 by 80 pixels,
so you should use these values for the applet width and height.
If the mode is "wide", then the form is arranged
so that it is wider than it is high.
In "high" mode the form is higher than it is wide.
If in "applet wide" mode the applet should typically be at least 450x250 pixels.
If in "applet high" mode the applet should typically be at least 200x350 pixels.
Version 1 only Version 1.7.1 uses the index parameter to specify the index file, the language parameter to give the language file, and the query parameters for the initial index query. |
In version 2, you should use one or more index<N> parameters instead,
eg index1, index2, etc.
NB: the index, language and
query parameters are still supported.
Each index<N> parameter should have one or more of these comma-separated string fields.
index | The index file URL, relative to the document base | ||||||
language | The language file URL, relative to the code base | ||||||
options |
One or more of the following options:
|
||||||
selection | The URL to be selected initially in the Contents tree. | ||||||
query | The initial query in the Index. |
Here are some example parameters:
<PARAM NAME=index1 VALUE=index.hi> <PARAM NAME=index2 VALUE="indexfr.hi,french2.hil,,index.html"> <param name=index3 value="JDKAPI.hi,,index sort,,class java."> <param name=index4 value="dbex.hi,dbex2.hil,index nocontents">The index, language, etc. specified in index1 are used at startup. Note that the user's default language is not detected.
If index1 is not given then version 1 index, language and query parameters are used.
If there is only one index then the Select tab is not displayed.
<APPLET code=HelpIndex.class codebase=classes width=70 height=80>
Remember that your help index file must be accessible to HelpIndex. Java security rules say that it cannot access a directory higher in the disk hierarchy. So if HelpIndex is in a classes sub-directory, then your help index file must be in classes or lower.
Important: Note carefully that the HelpIndex classes must be on the same server as the web page which calls it. If this were allowed then you would be using the resources of someone else's server.
If using frames, you may well want to use the "skip target" option when running MakeHelpIndex. See Frames and the Skip Target.
Here are three suggestions for how to use HelpIndex in framesets.
These examples assume the following frameset, ie a thin contents column and a wide main window.
<FRAMESET COLS=1*,3*> <FRAME SRC=contents.html NAME="Contents"> <FRAME SRC=welcome.html NAME="Main"> </FRAMESET>
Have the following HTML in contents.html:
<APPLET code=HelpIndex.class width=100% height=90%> <PARAM NAME=index VALUE=siteindex.hi> <PARAM NAME=mode VALUE="applet high"> <PARAM NAME=target VALUE=Main> </APPLET>Note that the target parameter is set to "Main" to indicate that pages should be displayed in the Main frame.
Have the following HTML in contents.html:
<APPLET code=HelpIndex.class width=70 height=80> <PARAM NAME=index VALUE=siteindex.hi> <PARAM NAME=mode VALUE=icon> <PARAM NAME=target VALUE=Main> </APPLET>Note that the target parameter is set to "Main" to indicate that pages should be displayed in the Main frame.
Important: If running in icon mode, you can display a page which removes the page which called HelpIndex from the screen. The HelpIndex window still appears on the screen but pressing Display Page does not work. So be especially careful to avoid a target of "_top". We are not sure if this is a HelpIndex bug or a browser problem.
search.html could have the following HTML:
<APPLET code=HelpIndex.class width=450 height=250> <PARAM NAME=index VALUE=siteindex.hi> </APPLET>Note that the target parameter is not needed as it defaults to "_self" which displays the page in the existing frame, ie "Main".