Chapter 13. Dreamweaver Behaviors

Chapter 6 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’ve already seen some of the JavaScript-powered tools like the Spry menu, Spry form validation, and all of the cool Spry tricks discussed in the previous chapter.

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 arrays, functions, and the Document Object Model; and spend weeks discovering the eccentric rules governing how different browsers interpret JavaScript code differently.

Like the new Spry tools, Dreamweaver’s Behaviors let you add dynamic JavaScript programs to your Web pages without doing a lick of programming. Most Dreamweaver Behaviors have been around for a long while, but Dreamweaver CS3 added a new set of behaviors called Spry Effects that let you add dazzling visual touches like fading a photo in or out, highlighting a portion of a page with a flash of color, and shaking a <div> tag to catch a visitor’s attention.

Note

What’s that you say? You would like to read a book on JavaScript? Happy to oblige: JavaScript: The Missing Manual, written by yours truly.

Understanding Behaviors

Dreamweaver behaviors are prepackaged JavaScript programs that let you add interactivity to your Web pages ...

Get Dreamweaver CS4: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.