Navigation:  More Advanced Procedures > Using Context-Sensitive Help >

Application calls to Webhelp

Print this Topic Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Text

You can create context-sensitive calls to Webhelp (web HTML) from your application or web pages with normal URLs using the syntax explained below. These calls can be made locally, across networks or across the Internet.

Field-level popups are not supported in Webhelp, they can only be implemented with HTML Help (CHM) or Winhelp (HLP). The JavaScript popups supported in Webhelp can only be used within your help, you cannot make calls to them from your application or web pages.

How to make calls to Webhelp topics

Calls to Webhelp must be normal URLs, made in the same way as any other URL link that opens a browser with a specific web location or local HTML file, using exactly the same syntax:

Calling syntax:

index.html?topicname.htm#anchorname

Examples:

This example uses the standard file names and extensions and accesses an anchor in the referenced topic:

index.html?introduction.htm#gettingstarted

The following example shows a call to a project that was compiled with both a non-standard index file name and a non-standard extension for the topic files (see below). There is no reference to an anchor in this example.

help.html?new_features.html

Elements of the calls:

index.html

This is the name of the index file of your Webhelp (this is the default, it can be changed in the Publish dialog when you compile). If you use this on its own it will simply display the help system with the standard home topic.

?topicname.htm

This is the name of the topic you want to display. This is created by combining the topic ID with the extension .htm..

This is the default topic extension, you can change it in Project Configuration >  Publishing Options > Webhelp > HTML Export Options. (These settings are shared with the other HTML-based output formats and can also be accessed in the HTML Help and Visual Studio Help sections.)

#anchorname

Optional. This is the name of an anchor in the topic that you want to jump to.

Calling Webhelp topics without the TOC

Normally, a link to a topic file will automatically display the entire help with the TOC even if you don't include the index.html part of the URL. This is achieved with a redirect script in every topic page. However, It is also possible to call just the topic without the TOC if you want. You do this by adding a simple switch to your URL.

Calling syntax for topic only:

topicname.htm?toc=0#anchorname (with an anchor)

topicname.htm?toc=0 (without an anchor)

Avoid direct calls to the topic file

Theoretically you don't actually need to include the index.html file in the URL. If you make a direct call with the format topicname.htm or topicname.htm#anchorname this will automatically display the entire help system with the Table of Contents.

This is not a good idea, however: Under some circumstances it can confuse the browser history, making it impossible for users to navigate with the Back and Next buttons.

It is thus always advisable to use the full call including the index file, using the standard syntax:

index.html?introduction.htm#gettingstarted

See also:

Creating popup topics

Context-Sensitive Help & Popups

Topic files without TOC entries

 


Page url: http://www.helpandmanual.com/help/index.html?hm_advanced_contexthelp_browsercalls.htm