Click to return to the HTML Help home page    
Web Workshop  |  DHTML, HTML & CSS  |  HTML Help

Create a Pop-up Window in an HTML file


Microsoft Corporation

June 23, 1998

  1. Click here to see a sample pop-up window.
  2. Download HTML Help and start HTML Help Workshop.
  3. Open an HTML file and position the cursor where you want to add a pop-up window.
  4. Click HTML Help ActiveX control.
  5. In the Specify the command box, click HHCTRL Version and, if you have already used the HTML Help ActiveX control in this file, enter an ID name for this instance of the control.
  6. Click Next, and then click Hidden to specify that you will be scripting this use of the HTML Help ActiveX control.
  7. Copy the following into your file:

    <A HREF= JavaScript:hhctrl.TextPopup(MyText,"Verdana,10",9,9,-1,-1)> Click Here</A>


  8. In this example, 10-point Verdana is the font for the pop-up window, followed by a value of 9 for the left and right margin, and -1 for the foreground and background colors.

  9. Replace the words "Click Here" with the link text you want for the pop-up window.
  10. Copy the following JavaScript into your file:

    <script>MyText="Enter the text that will appear in the pop-up window."</script>

    In this example, MyText is the name of the string, specified in step 6, that the TextPopup command should look for.

  11. Replace the words "Enter the text that will appear in the pop-up window" with the words you want to use.


Back to topBack to top

Did you find this material useful? Gripes? Compliments? Suggestions for other articles? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.