Context Sensitive Help Test Page
Here's text in a sample div.
Let's pretend the help button is for using links.
And here is another div.
This one is for instructions on using bookmarks.
The system works perfectly as long as WebHelp is not already open.
If WebHelp is open, and the user clicks a help button somewhere
else in the application, the WebHelp window comes to the top, but the
displayed page does not change from where it was before. (To change that
behavior, WebHelp itself would have to be revised.)
How to use it
- Put this code at the top of the HTML page:
- Put this code anywhere you want a help button:
<img border="0" alt="help" src="help_button.png" width="18" height="18">
Use any image you want, of course, and insert the ID of the topic
you want to display.
- For extra security and faster downloads, use the "minify" tool to remove
comments and whitespace:
How it works:
- help_index.js maps topic IDs to their titles.
The content of that file is extracted from the DITA files. The ID maps
to the navtitle, if one is specified in the topic. Otherwise, it maps
to the topic title.
- json_sans_eval.js contains a very fast parser from Google that converts the
help_index into a lookup table that can be rapidly accessed.
- showhelp.js contains a showhelp() function that takes a topic ID as an argument
- That function looks up the topic title and passes it to the WebHelp application.
- The WebHelp application launches in a new window, positioning the reader at
the targeted page.
Only topics can be directly addressed--not sections or elements within them.
(Topic titles are passed in the WebHelp URL as #<topic title>.
Passing #<topic title>/<topic ID> did not work.
Nor did #<topic title>/<section title>.)