Behaviors overview

A behavior is a combination of an event and an action. Actions are prewritten JavaScripts that perform specific tasks, such as opening a browser window, playing a sound, or stopping a Shockwave movie. Events are defined by the browser for each page element; for example, onMouseOver, onMouseOut, and onClick are events associated with links in most browsers, whereas onLoad is an event associated with images and the document body.

When attaching a behavior to a page element, you specify an action and the event that triggers it. Several actions can all be triggered by the same event, and you can specify the order in which the actions occur.

Click Show Me to see how to create a behavior.

Dreamweaver includes several behavior actions; additional actions can be found in the Extensibility Exchange in the Dreamweaver Developers Center as well as on third-party developer sites. See Downloading and installing third-party behaviors. You can also write your own behavior actions if you are proficient in JavaScript. For more information on writing behavior actions, see Extending Dreamweaver overview.