DREAMWEAVER CS3
User Guide
348
The Behaviors panel has the following options:
Show Set Events
Displays only those events that have been attached to the current document. Events are organized
into client-side and server-side categories. Each category’s events are in a collapsible list. Show Set Events is the
default view.
Show All Events
Displays an alphabetical list of all events for a given category.
Add Action (+)
Displays a menu of actions that can be attached to the currently selected element. When you select
an action from this list, a dialog box appears in which you can specify parameters for the action. If all the actions are
dimmed, no events can be generated by the selected element.
Delete (–)
Removes the selected event and action from the behavior list.
Up and down arrow buttons
Move the selected action up or down in the behavior list for a particular event. You can
change the order of actions only for a particular event—for example, you can change the order in which several
actions occur for the
onLoad
event, but all the
onLoad
actions stay together in the behavior list. The arrow buttons
are disabled for actions that can’t be moved up or down in the list.
Events
Displays a pop-up menu, visible only when an event is selected, of all the events that can trigger the action
(this menu appears when you click the arrow button next to the selected event name). Different events appear
depending on the object selected. If the events you expect don’t appear, make sure that the correct page element or
tag is selected. (To select a specific tag, use the tag selector at the lower-left corner of the Document window.) Also
make sure that you selected the correct browser or browsers in the Show Events For submenu.
Note:
Event names in parentheses are available only for links; selecting one of these event names automatically adds a
null link to the selected page element, and attaches the behavior to that link instead of to the element itself. The null link
is specified as href="javascript:;" in the HTML code.
Show Events For
Specifies the browsers in which the current behavior should work (this is the submenu in the
Events menu). The selection you make from this menu determines which events appear in the Events menu. Older
browsers generally support fewer events than newer browsers, and in most cases, the more general your choice of
target browsers, the fewer events are shown. For example, if you select 3.0 and Later Browsers, the only events you
can select are those available in Netscape Navigator and Microsoft Internet Explorer versions 3.0 and later—a very
limited list of events.
About events
Each browser provides a set of events that you can associate with the actions listed in the Behavior panel’s Actions
(+) menu. When a visitor to your web page interacts with the page—for example, by clicking an image—the browser
generates events; those events can be used to call JavaScript functions that perform an action. Dreamweaver supplies
many common actions that you can trigger with these events.
For names and descriptions of the events provided by each browser, see the Dreamweaver Support Center at
www.adobe.com/go/dreamweaver_support
.
Different events appear in the Events menu depending on the selected object and on the browsers specified in the
Show Events For submenu. To find out what events a given browser supports for a given page element, insert the page
element in your document and attach a behavior to it, then look at the Events menu in the Behaviors panel. (By
default, events are drawn from the HTML 4.01 events list, and are supported by most modern browsers.) Events may
be disabled (dimmed) if the relevant objects do not yet exist on the page or if the selected object cannot receive
events. If the expected events don’t appear, make sure the correct object is selected, or change the target browsers in
the Show Events For submenu.
September 4, 2007