• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 5. Adding User Interactivity > Editing Actions and Events

Editing Actions and Events

You can edit actions and events in several ways: You can change the event to which an action corresponds, you can attach several actions to a single event, and you can change the order in which those actions occur. For example, Swap Image is the action, and OnMouseOver is the event that corresponds to the rollover behavior. In this exercise you will add an action for a pop-up message and select a corresponding event.

In the architecture.html document, select the Markings button. Click the plus sign (+) button in the Behaviors panel and choose Popup Message from the Actions drop-down menu.

The Popup Message dialog box opens, displaying a text field in which you can type your message.

Type How unique markings differentiate lighthouses and click OK.

The Popup Message action and the corresponding event appear in the Behaviors panel.

Select the event in the Behaviors panel, and choose Show Events For > 4.0 and Later Browsers from the Events drop-down menu to the right of the event. Then choose (onMouseOut) from the same Events drop-down menu.

The events in the drop-down menu might differ depending on the action and the browser type you choose. The Events menu appears only when you select an action and event combination in the list. You can choose what browser type to display events for by making a choice from the Show Events For menu at the bottom of the Events menu.


The Events pop-up menu is divided into two sections. In the top portion, Dreamweaver displays events that can be attached to objects directly. The bottom section shows, in parentheses, events that need an anchor placed around the object. If you insert a Rollover Image (either by choosing Insert > Interactive Images > Rollover Image, or by choosing Insert Rollover Image from the Insert bar) as you did in the first exercise of this lesson, Dreamweaver adds the anchor for you by inserting a number sign (#) into the Link text field of the Property inspector. If you are not using a rollover, you need to add a null link, using a number sign (#), or a working link in the Property inspector yourself.

Click the up-arrow button in the Behaviors panel to move the Popup Message behavior to the top of the list.

The browser will perform the actions in the order in which they appear in this list. The up arrow moves the action up in the list; the down arrow moves the action down in the list. Use these buttons to change the order in which actions are executed.

Save and preview the page in the browser.

Use care when adding the Popup Message behavior to your pages. Like pop-up windows, these messages can quickly annoy your visitors when overused.

Leave this file open to use in the next exercise.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint