Using Behaviors
439
onSelect
(NS3, NS4, IE3, IE4, IE5) is generated when the visitor selects text
in a text field.
onStart
(IE4, IE5) is generated when a marquee element’s contents begin a loop.
onSubmit
(NS3, NS4, IE3, IE4, IE5) is generated when the visitor submits a form.
onUnload
(NS3, NS4, IE3, IE4, IE5) is generated when the visitor leaves the page.
Attaching a behavior
You can attach behaviors to the entire document (that is, to the
body
tag) or to
links, images, form elements, or any of several other HTML elements. The target
browser you choose determines which events are supported for a given element.
Internet Explorer 4.0, for example, has a much wider array of events for each
element than Navigator 4.0 or any 3.0 browser.
Note:
You can’t attach a behavior to plain text. For details, see “About behaviors and text”
on page 441.
You can specify more than one action for each event. Actions occur in the order in
which they’re listed in the Actions column of the Behaviors panel. For information
on changing the order of actions, see “Changing a behavior” on page 442.
To attach a behavior:
1
Select an element on the page, such as an image or a link.
To attach a behavior to the entire page, click the
<body>
tag in the tag selector
at the bottom left of the Document window.
2
Choose Window > Behaviors to open the Behaviors panel.
The HTML tag of the selected object appears in the title bar of the
Behavior panel.
3
Click the Plus (+) button and choose an action from the Actions pop-up menu.
Actions that are dimmed in the menu can’t be chosen. They may be dimmed
because a required object doesn’t exist in the current document. For example,
the Play Timeline action is dimmed if the document has no timelines, and the
Control Shockwave or Flash action is dimmed if the document contains no
Shockwave or Flash movies. If no events are available for the selected object, all
actions are dimmed.
When you choose an action, a dialog box appears, displaying parameters and
instructions for the action.
Summary of Contents for 38028779 - Macromedia Dreamweaver - Mac
Page 1: ...macromedia Using Dreamweaver...
Page 148: ...Chapter 4 148...
Page 296: ...Chapter 12 296...
Page 472: ...Chapter 18 472...
Page 512: ...Chapter 21 512...
Page 562: ...Appendix 562...