• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Behavior Modification

Chapter 16. Behavior Modification

JavaScript behaviors can be used to make both flashy and actually useful gadgets, such as popup messages and complex rollovers. When used in conjunction with CSS styles (Chapter 11) and layers (Chapter 14), these tools are called Dynamic HTML, in which the page can change after it loads (Figures 16.1 through 16.3).

Figure 16.1. This page incorporates several behaviors, although you can't see them yet. In the background, the browser is pre-loading hidden layers and images.


Figure 16.2. When I mouse over the button, the layers in Figure 16.1 disappear and a new layer appears.


You can make things happen on a page when a user loads the page, clicks an object, or moves the mouse around. Obviously, I'm simplifying—there are a lot of fancy things you can do with JavaScript (see the sidebar, Learning JavaScript). In this chapter I discuss the stock behaviors that Dreamweaver lets you apply—all without writing a line of code by hand.

You've already used some preset behavior tools if you've inserted an image rollover or a navigation bar (Chapter 7) or a jump menu (Chapter 15). In Chapter 17, you can get even fancier with Timelines.

Tip

All the actions that Dreamweaver provides work with version 4.0 and later browsers, and many also work with earlier browsers (as I note when explaining each action).


Tip

Not all events are available to all browsers, and not all actions work in all browsers, so choosing which behaviors to use depends on which browsers you want to target.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint