Specifications

Chapter 222
For all extensions, Dreamweaver executes code in other event handlers (for example,
onBlur="alert(’This is a required field.’)") when the user interacts with the form
fields to which they are attached.
Dreamweaver MX supports the use of links within extensions. Event handlers in links must use
syntax as shown in the following example:
<aref=”#” onMouseDown=”alert(‘hi’)”>link text</a>
Plug-ins (set to play at all times) are supported in the BODY of extensions. The
document.write() statement, Java applets, and ActiveX controls are not supported in
extensions.
Running scripts at startup or shutdown
If you place a command file in the Configuration/Startup folder, the command runs as
Dreamweaver starts up. Startup commands load before the menus.xml file, before the files in the
ThirdPartyTags folder, and before any other commands, objects, behaviors, inspectors, floating
panels, or translators. You can use startup commands to modify the menus.xml file or other
extension files. You can also show warnings, prompt the user for information, or call
dreamweaver.runCommand() on page 400. However, from within the Startup folder, you
cannot call a command that expects a valid DOM.
Similarly, if you place a command file in the Configuration/Shutdown folder, the command runs
as Dreamweaver shuts down. From the shutdown commands, you can call
dreamweaver.runCommand() on page 400
, show warnings, or prompt the user for
information, but you cannot stop the shutdown process.
For more information about commands, see Commands on page 61.
Working with the Extension Manager
If you are creating extensions for others users, you must package them according to the guidelines
on the Macromedia Exchange website under Help > How to Create an Extension. After you have
written and tested an extension in the Extension Manager, choose File > Package Extension. After
the extension is packaged, you can submit it to the Exchange from the Extension Manager by
choosing File > Submit Extension.
The Extension Manager comes with Dreamweaver MX. Details about its use are available in its
Help files and on the Macromedia Exchange website.
Extensible document types in Dreamweaver
XML provides a rich system for defining complex documents and data structures.
Dreamweaver MX uses several different XML schemas to organize information about server
behaviors, tags and tag dialogs, components, document types, and reference information.
When you create and work with extensions in Dreamweaver, you find there are many instances in
which you can create or modify existing XML files to manage the data that your extension uses.
In many cases, you can copy an existing file from the appropriate subfolder within the
Configuration folder to use as a template that you can change according to your needs.