Dynamic HTML Collections

The Dynamic HTML object model helps considerably in analyzing and reporting the inner structure of an HTML page. Given a document object reference, you are now able to find out everything about it. To form a meaningful idea of what we're talking about, let's consider a Win32 executable module. As you probably know an executable module—be it an EXE or a dynamic library—may be provided by several distinct libraries. Unless such links are defined at run-time only, you can examine the details of these subsidiary modules by looking at the file format structure. There are system libraries and tools that help to do this. As a result, you can be informed of all the modules that concur to the correct working of a program, simply by examining the structure of the file itself.

The figure shows the About dialog box displayed by Microsoft Outlook Express. As you can see, it lists all the modules that actually form the program and make it run. Such information is available inside a special section in the main executable file for the application.

We'll attempt to code similar behavior for Scriptlets in this chapter. Our intention is to walk down the Scriptlet object model and indicate all the external files that may be considered part of the component which you need to distribute as necessary accessories.

In reaching this result, we can rely on the various types of collection that populate the Dynamic HTML object model. By using them, we could obtain the result shown above for a Win32 executable.

We're talking mainly about Scriptlets, but what we demonstrate in the next lines applies to any HTML page as well.

© 1997 by Wrox Press. All rights reserved.