If you're attaching a behavior to an image, some events (such as
parentheses. These events are available only for links. When you select one of them, Dreamweaver
wraps an
tag around the image to define a null link. The null link is represented by
a
in the Property inspector's Link text box. You can change the link value if you
javascript:;
want to turn it into a real link to another page, but if you delete the JavaScript link without
replacing it with another link, you will remove the behavior.
For a detailed advanced look at precisely which tags can be used with a given event in a given
browser, search for the event in one of the files in the Dreamweaver/Configuration/Behaviors/
Events folder.
Applying a behavior
You can attach behaviors to the entire document (that is, to the
form elements, or any of several other HTML elements.
The target browser you select 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 Netscape
Navigator 4.0 or any 3.0 browser.
Note: You can't attach a behavior to plain text. For more information, see
text" on page
374.
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
To attach a behavior:
Select an element on the page, such as an image or a link.
1
To attach a behavior to the entire page, click the
left of the Document window.
Select Window > Behaviors to open the Behaviors panel.
2
Click the Plus (+) button and select an action from the Actions pop-up menu.
3
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 Control Shockwave or
Flash action is dimmed if the document contains no Shockwave or Macromedia Flash SWF
files. If no events are available for the selected object, all actions are dimmed.
When you select an action, a dialog box appears, displaying parameters and instructions
for the action.
Enter parameters for the action, and click OK.
4
All actions provided in Dreamweaver work in 4.0 and later browsers. Some actions do not
work in older browsers. See
on page
376.
The default event to trigger the action appears in the Events column. If this is not the trigger
5
event you want, select another event from the Events pop-up menu. (To open the Events pop-
up menu, select an event or action in the Behaviors panel, and click the downward-pointing
black arrow that appears between the event name and the action name.)
375.
<body>
"Using the behavior actions that come with Dreamweaver"
) appear in
onMouseOver
tag) or to links, images,
body
"Attaching a behavior to
tag in the tag selector at the bottom
Applying a behavior
373
Need help?
Do you have a question about the DREAMWEAVER MX 2004-USING DREAMWEAVER and is the answer not in the manual?
Questions and answers