O'Reilly logo

Dreamweaver 8: The Missing Manual by David Sawyer McFarland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying Behaviors

Dreamweaver makes adding behaviors as easy as selecting a tag and choosing an action from a drop-down menu in the Behaviors panel.

The Behaviors Panel

The Behaviors panel is mission control for Dreamweaver's behaviors (Figure 11-1). On it, you can see any behaviors that are applied to a tag, add more behaviors, and edit behaviors that are already applied.

Behaviors are grouped by event and listed in the order in which they occur on the Behaviors panel. You can change the type of event by clicking the event name and selecting another event. For actions with different events, the order is irrelevant, since the event determines when the action takes place, not the order. However, as you see here, it's possible to have one event—onClick—trigger multiple actions. When one event triggers several behaviors, you can change the order in which they occur with the up and down pointing arrows

Figure 11-1. Behaviors are grouped by event and listed in the order in which they occur on the Behaviors panel. You can change the type of event by clicking the event name and selecting another event. For actions with different events, the order is irrelevant, since the event determines when the action takes place, not the order. However, as you see here, it's possible to have one event—onClick—trigger multiple actions. When one event triggers several behaviors, you can change the order in which they occur with the up and down pointing arrows

You can open the Behaviors panel in any of three ways:

  • Choose Window Behaviors.

  • Press Shift+F4.

  • If the Tag inspector is open, click the Behaviors tab.

In any case, the panel appears on your screen.

Note

Dreamweaver includes two different types of behaviors, and it's important not to get them confused. This chapter describes JavaScript programs that run in your audience's Web browsers—these are called "client-side" programs. The server behaviors listed in the Application panel group, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required