Example: Create expandable sections with DHTML

Microsoft HTML Help

Example: Create expandable sections with DHTML

You can use Dynamic HTML (DHTML) to create expandable sections in your HTML files. This can be helpful when you document screen shots and other items that occupy a large amount of screen space. Expandable sections give the user more control over the display of such elements, letting them display them as needed.

These topics use, as samples, the source code for the sidebars in the HTML Help documentation.

There are three steps to creating expandable sections:

  1. Create the tag that will contain the contents for each section.
  2. Insert the JavaScript code.
  3. Update your style sheet to reflect the new section.

Notes

  • You can use this example with both uncompiled HTML files and compiled help (.chm) files.
link to overview topic About the script and DHTML examples