#### 18.5.2 Using KeyHelp for pop-ups

KeyHelp is a freeware DLL that is part of Ralph Walden’s Key Tools. KeyHelp allows you to embed better pop-ups in HTML Help. For information about Key Tools, see:

http://grainge.org/pages/authoring/reverse_engineering/reverse_engineering.htm

For KeyHelp pop-ups to work, the KeyHelp ActiveX control, keyhelp.ocx, must be installed and registered on each user’s system.

You must use DITA2Go macros (see §37. Working with macros) to construct the HTML code that is needed around the content. For example, in your configuration file, you could include the following settings:

[Inserts]
Head=<$KeyPopup>
[KeyPopup]
<script language="JavaScript" type="text/javascript">
var KeyPopup;
function KeyDisplayPopup(URL) {
if (!KeyPopup) {
KeyPopup = new ActiveXObject("KeyHelp.KeyPopup");
}
KeyPopup.DisplayURL(URL,-1,-1);
}
</script >

The cross-reference format you use to reference the pop-up should apply a character format; for example, PopText:

<PopText><$paratext></>

To make the cross references call the KeyHelp DLL, include the following settings:

[XrefStyles]
PopText=LinkSrc

[XrefStyleLinkSrc]
PopText=JavaScript:KeyDisplayPopup('myproj.chm::<$$_linksrc>')

Make sure the material to be popped up is in a file of its own. For example, if you are using glossary entries as pop-up topics:

[HtmlStyles]
GlossaryTerm=Split Title

Previous Topic: 18.5.1 Using HTML Help for pop-ups

Next Topic: 18.5.3 Using WinHelp for pop-ups

Parent Topic: 18.5 Creating pop-ups for HTML Help

Sibling Topics:

18.5.1 Using HTML Help for pop-ups

18.5.3 Using WinHelp for pop-ups

Table of Contents • Index