Website Deliverables - webworks.com Previous Next Index Print
Calling WebWorks Help 5.0 Context-Sensitive Help

Calling WebWorks Help 5.0 Context-Sensitive Help

Last Modified: February 6, 2007

ePublisher Pro

This article describes the most recent API module for the WebWorks Help 5.0 output format.

Background

Software applications can call a context-sensitive WebWorks Help topic either by using a standard URL or by using the WebWorks Help API. Using the API instead of simple URLs gives the developer increased flexibility and enhanced control. Benefits of using the API include the following:

*

The API reduces the amount of code software developers must write in order to integrate context-sensitive Help. Without the API, developers must code their own COM interface to communicate with Internet Explorer on the Windows platform. Full source code is pro­vided as part of the WebWorks Help API.

*

Using the API can significantly reduce the time required to load an individual topic if the Help system is already open in the browser window. If your application calls a topic using a URL instead of the API, the entire frameset, including the WebWorks Help applet, is loaded each time the user invokes Help. If the application calls a topic using the API, and the correct helpset is already loaded in the browser window, neither the frameset nor the applet is reloaded; instead, the topic frame is used to display the correct Help topic. This results in a significant performance improvement for users of your WebWorks Help sys­tem.

*

It is now possible to call the API from .NET, and we include examples to do so from C# and Visual Basic. Features in this API package include a DLL and COM object for the Windows platform, examples and projects to build them, as well as documentation.

*

The most recent release of the WebWorks Help API is version 4.0.5 (09/02/2004). It is compatible with the WebWorks Help 4.0 format and later. However, WebWorks Help 5.0 does not support Java navigation, so these options should not be implemented. For more informa­tion, see

WebWorks Help using URLs

You can call a WebWorks Help system using a standard http: or file: URL. By varying the syntax of the URL, you can call the overall Help system, an individual topic, or the accessible version of the Help.

To open a WebWorks Help system, you normally call a particular URL. For example, you might open a WebWorks Help system from a Web server by calling the following URL:

http://www.webworks.com/wwp2003/index.htm

If the WebWorks Help system were stored in the user's local file system, you would use a file: URL like this:

file:///C:/Program Files/YourApplication/Help/index.htm

Either of these URLs would open the WebWorks Help system, displaying the splash screen in the topic frame.

Opening an individual topic in the frameset view

To open a specific topic, you would call a URL like this:

http://www.webworks.com/wwp2003/index.htm?context=user_guide&topic=project_launcher

In this URL, the context value (user_guide) is the top-level group defined and uniquely identifies a particular Help system, and the topic ID (project_launcher) uniquely identifies a particular topic within the Help system. This URL would open the WebWorks Help system, displaying the appropriate topic in the topic frame.

By adding a value to the URL, you can display a context-sensitive Help topic without the WebWorks Help navigation frame also being displayed. For example:

http://www.webworks.com/wwp2003/index.htm?context=user_guide&topic=project_launcher&single=true

By including single=true, you instruct WebWorks Help to display the topic in topic only view.

Calling WebWorks Help using the WebWorks Help API

WebWorks Help also incorporates an API that software developers can use to call context-sensitive topics in a WebWorks Help system. Using the API instead of simple URLs gives the developer increased flexibility and enhanced control. Benefits of using the API include the following:

*

The API reduces the amount of code software developers must write in order to integrate context-sensitive Help. Without the API, developers must code their own COM interface to communicate with Internet Explorer on the Windows platform. This code is provided as part of the WebWorks Help API.

*

Using the API can significantly reduce the time required to load an individual topic if the Help system is already open in the browser window. If your application calls a topic using a URL instead of the API, the entire frameset, including the WebWorks Help applet, is loaded each time the user invokes Help. If the application calls a topic using the API, and the correct helpset is already loaded in the browser window, neither the frameset nor the applet is reloaded; instead, the topic frame is used to display the correct Help topic. This results in a significant performance improvement for users of your WebWorks Help sys­tem.

The WebWorks Help API is a C/C++ API and can be used with applications written in C, C++, Visual Basic, and Java.

*

We have not yet updated the API for WebWorks Help 5.0. However, the WebWorks Help 4.0 API can be used. Just be sure not to use any of the Java navigation options, as WebWorks Help 5.0 does not include the Java navigation.

API package 4.0.6 available for download

Version 4.0.5 introduced an API for Javascript to this package. The API for Javascript is made available for use of WebWorks Help with web applications. The API for Javascript includes a Javascript source file, an example and documentation.

Version 4.0.6 (December 2006) includes a minor update to work around Internet Explorer 7.0’s security settings which strip the query string from local URLs. This “bug” prevents previous versions of the API from passing context and topic arguments to the WebWorks Help 5.0 output, resulting in the main entry-point file (index.html) being displayed instead of the requested topic page.

The WebWorks Help 4.0.6 API is available for download from our online Wiki:

http://wiki.webworks.com/DevCenter/Projects/WebWorksHelp/WebWorksHelpAPI

The WebWorks API is written in ANSI compliant C for portability. It is intended to be no more than a starting point for developers implementing context-sensitive help into their applications, and we cannot offer support or documentation other than that provided here, in the Wiki article, and in the API download package.