To create a hyperlink to open the pop-up window

Microsoft HTML Help

To create a hyperlink to open the pop-up window

  • Copy the following code in your HTML file to call the TextPopup method of the HTML Help ActiveX control:

    <A HREF="JavaScript:popup.TextPopup(text_variable, font_variable,9,9,-1,-1)">Click Here</a>

    where popup is the ID you specified in step 2, text_variable and font_variable are the variable names you specified in step 1, the numeric values are the left and right margins (9,9) and the foreground and background colors (-1, -1) of the window, and Click Here is the link text.

Example

The following example references the HTML Help ActiveX control whose ID is popup and displays the text variable MyText and the font variable MyFont:

<A HREF=JavaScript:popup.TextPopup(MyText,MyFont,9,9,-1,-1)>
Click to see a pop-up window.</A>

A sample of the resulting link is shown below:

Click to see a pop-up window

Notes

  • You do not have to create a text link to call TextPopup. You can also use a script to call it.

back to the beginning Back to the beginning
 
link to overview topic About the script and DHTML examples