Linking web pages to help topics

To use the context-sensitive help examples you must enable scripting and allow pop-up windows in your web browser.

Imagine that this is a page on your web-based application. You have put useful prompts on the page, but sometimes you need to supply much information. With context-sensitive help, the users click a link to view a help topic that is related to the web page.

Your application is browser-based and it is for cross-platform use. Therefore, you need cross-platform help. Here we supply a WebHelp sample. The WebHelp was created using RoboHelp from Adobe, www.adobe.com).

Demonstration

Possibly, after you click a link, you must wait some seconds for the help to open.

This is a link to the WebHelp file (opens in a new window). The link is not context-sensitive.

Context-sensitive WebHelp. This is a link to Basic topic 1 and here is a link to Advanced topic 1 in the WebHelp demonstration help.

For the context-sensitive help, only one web browser window opens, no matter which links you click.

With old versions of Internet Explorer, the Back button does not operate as expected.

Calling a help page

Adobe supplies a JavaScript file called RoboHelp_CSH.js that must be referenced (or included) in each calling page. RoboHelp_CSH.js defines a function RH_ShowHelp that has the following syntax:

RH_ShowHelp(hParent, a_pszHelpFile, uCommand, dwData)

Parameters used in the RH_ShowHelp function
ParameterDescription
hParent Always use zero.
a_pszHelpFile The path to the starting page of the help project. To make sure that the help opens correctly, specify the name of the window using the parameter WindowName (in our examples, the name of the window is Mainwindow). The name is defined in the help project.
uCommand Use HH_HELP_CONTEXT to open the topic that has the map ID that is sent in the dwData parameter.
dwData The map ID of the topic to be displayed. Map IDs are defined in the help project. They can be supplied by the software developers or by the help author.

The following code calls the WebHelp Basic topic 1:
<A HREF='javascript:RH_ShowHelp(0, "context-WebHelp/start.htm>Mainwindow", HH_HELP_CONTEXT, 10)'>Basic topic 1</A>

The API shares the same parameters, regardless of the output type, which can be WebHelp, WebHelp Pro, or FlashHelp.

Download the WebHelp files:    context-WebHelp.zip, 444 KB.

See also

Viewing this website, Internet Explorer

Context-sensitive (pop-up) topic handling in Firefox

RSS feed