O'Reilly logo

Dreamweaver MX 2004: 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

Chapter 12. Dreamweaver Behaviors

Chapter 5 makes clear how easy it is to add mouse rollover effects using Dreamweaver’s Rollover Image object. That and other interactive features rely on scripts (small programs) written in the JavaScript programming language.

You could create the same effects without Dreamweaver, but you’d need to take a few extra steps: Buy a book on JavaScript, read it from cover to cover, learn about concepts like array, function, and document object model, and spend weeks discovering the eccentric rules governing how different browsers interpret JavaScript code differently.

With Behaviors, however, Dreamweaver lets you add these dynamic JavaScript programs to your Web pages without doing a lick of programming.

Note

If you’re used to Dreameaver MX (the pre-2004 version), you might notice that Macromedia hasn’t added any new behaviors to the 2004 version. In fact, a few JavaScript tricks—like animated layers and Dynamic HTML Timelines—have been removed.

Understanding Behaviors

Dreamweaver Behaviors are prepackaged JavaScript programs that let you add interactivity to your Web pages with ease, even if you don’t know the first thing about JavaScript. By adding behaviors, you can make your Web pages do things like:

  • Make layers appear and disappear.

  • Require visitors to fill out certain fields in a form (Chapter 11)—when, for example, you want to make sure that an email address or name is entered before the form is submitted.

  • Open a new browser window to a specified size, ...

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