Chapter 15. Dreamweaver Behaviors

Chapter 6 makes clear how easy it is to add mouse rollover effects to your web pages 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 JavaScript-powered tools, like the Spry menu, Spry form validation, and all 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 concepts like arrays, functions, and the Document Object Model; and spend weeks discovering the eccentric rules governing how different browsers interpret JavaScript code differently.

But 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 lets you add dazzling visual touches, like fading a photo in or out, highlighting a portion of a page with a flash of color, and making a <div> tag appear to shake to catch a visitor’s attention.

Note

What’s that you say? You’d 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 ...

Get Dreamweaver CS5.5: 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.