Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

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>

    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.

  8. Replace the words "Click Here" with the link text you want for the pop-up window.
  9. 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.

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

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

Back to topBack to top

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

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site