Function ShowHelp in JavaScript Web Applications and Web Pages
Following is information for Function ShowHelp in JavaScript.
function nethelp.showHelp(options)
The function accepts only one parameter "options" which is an object with the following properties:
-
Query (String or Object) Pass a string with a relative URL to open a topic by URL, or pass an object with two properties to perform a query by context ID, keyword, or group, or perform a search:
-
Key (String) Can be one of the following values: keyword, group, id, or search.
-
Value (String) Depends on the key parameter. If key is id, then value should contain a context ID; if key is keyword, then value should contain a keyword; and so on.
-
Tab (String) This parameter specifies the tab (by index or name) that will be shown when NetHelp is loaded. If any other value is specified the parameter will be ignored. Possible values: for Contents 0 or toc; for Index 1 or index; for search 2 or search. The default value is 0.
-
URL (String) URL of the main web page of the Help or a direct topic URL. For example, the URL of a locally deployed NetHelp target can be a file path, although it still needs to be encoded as a URL with the prefix "file:///," such as file:///C:/Program Files (x86)/MadCap Software/DocToHelp/Samples/MyProject/NetHelp/index.html; or, for a server-deployed NetHelp target it can be http://www.mycompany.com/myproject/index.html. This parameter is used to identify the Help system containing the topic. It is necessary because you may use multiple Help systems in the same application or even on the same web page.
-
Window (String) A frame or a browser window to display the topic. You can show the topic in any frame or in a separate browser window. This parameter has the same possible values as the TARGET attribute of the A (anchor) tag in HTML. If you want to display Help in a certain frame or in a separate browser window, set this parameter to that frame or window name. You can also use the standard names supported by the TARGET attribute of the A tag: _self, _blank, _parent, etc.
-
topicOnly (Bool) If true, the topic will display without the Contents, Index, and Search, and without header panel and toolbars. The user will still be able to navigate to other topics if this topic contains links to other topics, but the Contents, Index, and Search will be hidden. If false is passed, the complete Help system with Contents, Index, and Search, as well as header panel and toolbars, will display. The user will be able to navigate through the links in the topic and through the Contents, Index, and Search. The default value is false.
Include the D2H_ctxt.js file with your web pages, and add the following tag to the web pages where you want to use context-sensitive Help.
<script language="JavaScript" src="D2H_ctxt.js">
</script>