This function inserts a piece of JavaScript code or a Winhelp macro that is executed when the user clicks on the link in your help file. Note that scripts and macros are not supported in all output formats – see the compatibility list below for details.
See Scripts, HTML and Macros in the Reference section for some more background information on scripts and macros and how they are implemented and handled.
See The Hyperlink dialog for full details on the settings in the dialog. |
Help & Manual creates script links by inserting the code you type between <a href=" and ">. For example, if you type: javascript:alert('Hello World!'); The resulting link created in your output will be: <a href="javascript:alert('Hello World!');">Link text</a> This is just a simple example of course, you can place as much code in the script as you want. If you are familiar with JavaScript and HTML you can use this knowledge to create quite complex scripts! You just have to remember that everything you write is inserted between <a href=" and ">. See Scripts, HTML and Macros in the Reference section for more details. |
Macros can be typed and used just as you would use them manually in Winhelp. Note that Winhelp macros only work in Winhelp, except for the four macros that are translated for HTML Help (see below). If you are also generating other formats you need to create alternatives for the other formats using conditional output. See the help included with Microsoft Help Workshop (the Winhelp compiler package) for documentation of the macro functions available in Winhelp. Macros translated in HTML Help: The following four standard Winhelp macros are automatically translated to their HTML equivalents when you compile to HTML Help. This can be convenient as the syntax of these Winhelp macros is simpler and easier to enter:
|
Winhelp: |
All Winhelp macros, no scripts. Paths will generally work. |
HTML Help: |
JavaScript is broadly supported in CHMs. See the MS HTML Help Workshop documentation for details. Four standard Winhelp macros (see above) are translated to their HTML Help equivalents. Do not use paths. |
Visual Studio Help: |
Same as for HTML Help. |
Webhelp: |
Scripts are supported but support depends to a great extent on the user's browser, so use the same caution as when using scripting in any HTML pages. |
eBooks: |
Script and macro links are not supported. |
Adobe PDF: |
Script and macro links are not supported. |
Word RTF: |
Script and macro links are not supported. |
See also:
Webhelp (Project Configuration)
Page url: http://www.helpandmanual.com/help/index.html?hm_working_links_macros.htm