Accessing links using JavaScript

By default, HTML Help Workshop inserts a button to activate ActiveX commands such as ALinks and Related Topics links. If you don't want to use a button, you can easily use JavaScript to create a text hotspot instead, like this. The JavaScript code required to do this is very simple:

<a href=JavaScript:hhctrl_01.Click()>Click here</a>

The trick is to make sure that you reference the same id name as you used in the OBJECT tag. The OBJECT tag on this page uses an identifier named hhctrl_01, and you'll notice the JavaScript code references that identifier as well.

Tips