Reverb for Web Applications
Description
Reverb is a highly optimized implementation of web-based help and therefore does not require any javascript implementation files in order to embed it into your own custom web applications. However, your developers may find it useful to organize their Reverb Context sensitive help calls through a functional interface of their own design. Below you will find a fully functional implementation calling Reverb using a simple javascript function.
Feel free to copy this code and change it as you see fit to suit your developer requirements.
Contents
URL Syntax
http://your_web_address/your_folder_path/index.html#context/<group_context>/<topic_alias>
- group_context
- Specifies the group context value for the top-level group in which the topic resides in Document Manager. This group context is specified in merge settings for each top-level group.
- topic_alias
Specifies the value of the TopicAlias marker in the topic to open. For a complete list of these values, see your project's Topics Report.
Code (use in your web app)
function ReverbHelp(param_window_name, param_base_url, param_default_context) { this.DisplayContextTopic = function (param_context, param_topic) { var url; url = param_base_url + '#context/' + param_context + '/' + param_topic; windowObjectRef = window.open(url, param_window_name, 'width=700,height=800,menubar=0,status=0,toolbar=0'); windowObjectRef.focus(); } this.DisplayTopic = function (param_topic) { this.DisplayContextTopic(param_default_context, param_topic); } }
Sample Call (use default context)
<input type="button" value="Open Help" onclick="help.DisplayTopic(TOPIC_ALIAS);" />
Sample Call (use different context)
<input type="button" value="Open Help" onclick="help.DisplayContextTopic(CONTEXT, TOPIC_ALIAS);" />
Sample HTML Implementation
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Reverb Javascript Call Example</title> <script type="text/javascript"> <!-- function ReverbHelp(param_window_name, param_base_url, param_default_context) { this.DisplayContextTopic = function (param_context, param_topic) { var url; url = param_base_url + '#context/' + param_context + '/' + param_topic; windowObjectRef = window.open(url, param_window_name, 'width=700,height=800,menubar=0,status=0,toolbar=0'); windowObjectRef.focus(); } this.DisplayTopic = function (param_topic) { this.DisplayContextTopic(param_default_context, param_topic); } } var help; help = new ReverbHelp('connect_main', 'http://www.webworks.com/Documentation/Reverb/index.html', 'preparing'); // --> </script> </head> <body> <h1>Reverb Javascript Call Example</h1> <input type="button" value="Open Reverb Help" onclick="help.DisplayTopic('topic_links');" /> </body> </html>
Upgrading From WebWorks Help Javascript API
If you have an existing web application that uses the javascript API for WebWorks Help and want to migrate to using Reverb instead of WebWorks Help, then the following illustrates the differences in a simple case of a file originally configured to use the WebWorks Help API that has been modified to use Reverb.