The text for pop-up windows can be stored in one text file with the .js file name extension. This enables you to store the text for all pop-up windows in your entire help system in a single location. This also enables you to globally define the font attributes to be used for pop-up windows.
popfont="Facename[, point size[, charset[, PLAIN BOLD ITALIC UNDERLINE]]]"
Text1="The text for the first pop-up window."
Text2="The text for the second pop-up window."
where popfont is the name of the variable that specifies the font attributes for the pop-up text and Text1, Text2, and so on, are the variables that specify the text of each pop-up window.
<HEAD>
start and end tags:
<OBJECT
id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
>
</OBJECT>
<SCRIPT language=javascript
SRC="terms.js">
</SCRIPT>
where HHCTRL is the ID of the control that you are referencing, and terms.js is the name of your text file. You might want to include an error handler that is invoked if the specified text file cannot be found.
<A HREF="JavaScript:HHCTRL.TextPopup(Text1,popfont,9,9,-1,-1)"
Title="Click for pop-up definition">Word to be defined</A>
[FILES]
section of your project (.hhp) file.About the script and DHTML examples | |