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

To Create a Tag for an Expandable Section


Microsoft Corporation

Updated June 10, 1999

  1. Insert the following tags in your topic file at the location you want the expanding section to appear:

<a onclick="doSection(foo)" class="anchorclass" href="filename.htm">Link text</a>

<DIV CLASS="divclass" ID="foo" STYLE="display: none" onclick="noSection(foo)">
This is where the text appears.
</DIV>

Where doSection is the name of the first JavaScript function, which opens the section if it is closed, and closes it if it is open. noSection is the name of the second JavaScript function, which closes the section when the user clicks inside it. foo is the unique ID for this instance of the section, and filename.htm is the target file for the link.

Example

Notes


next step Insert the JavaScript code
 


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.