Example: Create an ALink using a text link

Microsoft HTML Help

Example: Create an ALink using a text link

  1. Click here to see a sample ALink text link.
  2. Open the HTML file in which you want to create an Associative link (ALink) as a text link.
  3. Click HTML Help ActiveX Control.

    HTML Help ActiveX Control

    Opens the HTML Help ActiveX Control Wizard, which enables you to insert or edit the control in an HTML file.

  4. In the Specify the command box, click ALink Search and, if you have already used the HTML Help ActiveX control in this file, enter an ID name for this instance of the control.
  5. Click Next, and then click Hidden to specify that you will be scripting this use of the HTML Help ActiveX control.
  6. Select the appropriate display type options, and then add the ALink names you want to jump to.
  7. Position the cursor at the location where you want to create the link, and then copy the following tag into your file:

    <A; HREF="JavaScript:hhctrl2Click()">add; link text here</A>

    In this example, hhctrl2 specifies 2 as the ID number for this instance of the HTML Help ActiveX control, which the ALink Search command should look for.
  8. Replace add link text here with the words you want to use.

Notes

  • For this example, the ALink name example was added to the beginning of the HTML file. When you click the text link, it jumps to all target files that contain example as an ALink name.
  • You can test ALinks in compiled help files.
  • For more information about ALinks, see the HTML Help ActiveX control reference.
Home page link About working with links