Actuate Information Console reference : Customizing Information Console online help : Using a custom help location
 
Using a custom help location
Any help system hosted by a web server can provide online help for an Information Console system. To make an external help system available to the Information Console application, the wwhelp.html file redirects help requests to that external system. Any specific help target can link to any specific page.
To redirect help requests from Information Console to an alternate URL, edit or replace the wwhelp.html file in <context root>\help. You can further specify different targets using the context and topic parameters in the URLs emitted by Information Console in help requests.
Customizing the help location with wwhelp.htm
Use the following procedure to create a wwhelp.htm file that redirects Information Console context-sensitive help requests to another URL.
1 In a text editor, open a new document.
2 Write the required pieces of an HTML file, as shown in the following code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<script type="text/javascript" language="JavaScript1.2">
<!--
...
// -->
</script>
</head>
<body>
</body>
</html>
3 Within the script block, write the JavaScript method GetParameter to capture URL parameters, as shown in the following code:
// get parameters from the URL
//
method GetParameter( name )
{
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
4 As shown in the following code, create a method to do the following tasks:
*Operate the page.
*Use GetParameter to obtain the topic and context from the URL.
*Open a URL based upon the topic and context.
method LaunchHelp()
{
// Get URL parameters
var context = GetParameter( 'context' );
var topic = GetParameter( 'topic' );
 
var baseURL = "http://myhelpserver/viewer/wwhelp.htm";
 
// Begin flow control using context
switch (context)
{
// map the "BIRTIV" context to an outside URL
case "BIRTIV" :
self.location = baseURL + "?single=true&context=" + context + "&topic=" + topic ;
break;
 
// map the "UserConsole" context to an outside URL
case "userconsole" :
baseURL = "http://myhelpserver/iPortal/wwhelp.htm";
self.location = baseURL + "?single=true&context=" + context + "&topic=" + topic ;
break;
 
//the default behavior
default :
self.location = baseURL ;
}
}
The LaunchHelp() method gets the context and topic information from the URL with two calls to GetParameter. The baseURL is set to the myhelpserver application’s online help. The flow control switch statements activate specific URLs depending upon the context. Because the myhelpserver application uses the same context and topic variables as standard Information Console help, they are used directly in constructing the URL when activating the self.location methods.
5 Replace the <body> tag with the body tag in the following line:
<body onLoad="LaunchHelp();">
The onLoad parameter activates LaunchHelp() when the page loads.
6 Save the file as wwhelp.htm in the <context root>\help directory.
7 Test the results by opening Information Console and selecting a help link. The resulting page is from the custom application. For example, the help link on the login page pictured in Figure 10‑4 would link to http://myhelpserver/iportal/help/wwhelp.htm?single=true&context=UserConsole&topic=Login_MyDoc_Enterprise.