O'Reilly logo

Dreamweaver CS4 For Dummies® by Janine Warner

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

Chapter 10. Adding Interactivity with Behaviors

In This Chapter

  • Adding behaviors to your Web page

  • Creating image rollovers

  • Using the Swap Image behavior

  • Launching a new browser window

  • Editing your behaviors

  • Enhancing Dreamweaver with extensions

Want to add cool effects like rollovers and pop-up windows? Dreamweaver's behaviors make it easier than ever to create these kinds of interactive features with a JavaScript scripting language.

Behaviors are ready-to-use scripts that can be customized to create a variety of features. You can apply behaviors to almost any element on an HTML page and even to the entire page itself. For example, you can use the Swap Image feature to create an interactive slide show or the Open Browser Window option to play a video in a small, separate browser window.

In this chapter, I introduce you to the Behaviors panel and show you how to use some of Dreamweaver's most popular options.

Brushing Up on Behavior Basics

When you start working with behaviors in Dreamweaver, you can get up and running more easily if you start with this basic introduction to how they work and the terminology they use. When you set up a behavior, you can choose from a number of triggers, or events, such as OnMouseOver or OnClick. Consider this slightly corny example: If you tickle someone and make the person laugh, you used an event to trigger an action. Dreamweaver would call the tickling the event and the laughter the action. The combination is a Dreamweaver behavior.

You may already be familiar ...

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