Program Help for web pages
This information is for developers connecting context-sensitive
Help topics to web pages.
Talk to the Help author to determine the following:
Who provides the map numbers.
If the project has context-sensitive Help.
Where the Help system resides (locally or on a server).
Open your web pages.
Link the pages to RoboHelp_csh.js.
Call the function contained in RoboHelp_csh.js wherever you
call Help from the website.
Program Help for web pages (WebHelp/Pro) Use the context-sensitive Help support
files. These files allow developers to call built-in functionality. The example below shows one way to declare a JavaScript function
that displays a secondary dialog. The ShowHelp function
shows the specified topic in a custom window with the attributes
defined by the strHelpOptions variable.
var strHelpOptions = "location=no";
strHelpOptions += ",toolbar=no";
strHelpOptions += ",menubar=yes";
strHelpOptions += ",status=yes";
strHelpOptions += ",scrollbars=yes";
strHelpOptions += ",resizable=yes";
strHelpOptions += ",top=0";
strHelpOptions += ",left=0";
strHelpOptions += ",width=400";
strHelpOptions += ",height=400";
function ShowHelp(strUrl)
{
window.open(strUrl, "Help", strHelpOptions);
}
To use ShowHelp, place the above script between
the </HEAD> and <BODY> tags in the HTML file. Include
an anchor tag like the following where users can get help:
Help!
This tag makes a hyperlink with the text Help! When an end user
clicks the hyperlink, widget.htm opens in a secondary browser.
Function calls from web pagesNote: This information is for developers connecting
context-sensitive WebHelp, WebHelp Pro, FlashHelp, or FlashHelp
Pro topics to web pages.
In the following examples, the API shares the same parameters
regardless of output type. The only change made is the location
of the Help file.
RH_ShowHelp syntaxfunction RH_ShowHelp(hParent, a_pszHelpFile, uCommand, dwData)
Parameter
|
Data Type
|
Description
|
|
|
var
|
Reserved for future versions of API. Use
"0."
|
|
|
var
|
Help source For WebHelp: "<Path to project
start page>" (Can be local or on a server) For WebHelp Pro: "http://[server name]/roboapi.asp"
*Optional:
To specify a window, use ">WindowName" at the end of this parameter
|
|
|
var
|
Constants:
HH_DISPLAY_INDEX Displays
Index pane and default topic.
HH_DISPLAY_SEARCH Displays
Search pane and default topic.
HH_DISPLAY_TOC Displays
Contents pane and default topic.
HH_HELP_CONTEXT Opens
topic associated with map ID in dwData parameter.
|
|
|
var
|
Map ID of the topic displayed. To obtain
the map ID, the author can export the map file for a programming
language using HH_HELP_CONTEXT in the uCommand parameter.
|
RH_OpenHelpTopic SyntaxCall the "RH_OpenHelpTopic"
function to open a WebHelp/FlashHelp topic. function RH_OpenHelpTopic(a_pszHelpMainPage, a_pszRelTopicUrl)
Parameter
|
Data Type
|
Description
|
a_pszHelpMainPage
|
var
|
Help source for WebHelp/FlashHelp: "Path
to project start page". To specify a window, append ">WindowName"
at the end Path to the project start page.
|
a_pszRelTopicUrl
|
var
|
Relative path of the topic corresponding
to the main page.
|
 To launch the entire Help
system (open to the default topic), make a Help call that sets uCommand to HH_DISPLAY_INDEX, HH_DISPLAY_SEARCH,
or HH_DISPLAY_TOC, and dwData to
"0". In WebHelp Pro systems, default window settings for default
navigation buttons override the HH_DISPLAY constant.
Call a context-sensitive function for WebHelp ProCall the following API for getting the context-sensitive
information from the server.
The following example assumes
that you have stored the full path to your RoboHelp server and a
window name (optional) in a string variable called StrPathAndWindow.
The project name is required if the Auto-Merge option is set to
Off in the RoboEngine Configuration Manager. Examples of the value
of this string are “http://RoboHelp Server:port/robohelp/server”
or “http://RoboHelp Server:port/robohelp/server?project=MyProject>MyWindow.”
Note: Ask your technical writer which windows to call.
Also, if the writer creates the map files, ask the writer to export
the map files to the location.
For example:
To open
the topic mapped as number 1:
<p>Click for Help (map number 1)</p>
Run the application and test the Help call.
Note: In WebHelp Pro projects, the new context-sensitive
Help API is supported only in RoboEngine 3.0 or later.
Call a context-sensitive function for WebHelp or FlashHelpCall the following API for getting the context-sensitive
information from the server.
http://servername>/robohelp/rest/robowindow?wtype=ctx&context=<MAP ID>
For
example:
To open the topic mapped as number 1, change the
<MAP ID> with 1.
Run the application and test the Help call.
|
|