beautypg.com

Create the behavior extension – Adobe Extending Dreamweaver CS4 User Manual

Page 242

background image

236

EXTENDING DREAMWEAVER CS4

Behaviors

Create the behavior extension

The following code presents a relatively simple example. The code checks the brand of the browser. The code opens
one page if the brand is Netscape Navigator and another if the brand is Microsoft Internet Explorer. This code can
easily be expanded to check for other brands such as Opera and WebTV and modified to perform actions other than
going to URLs.

1

Create a new blank file.

2

Add the following to the file:



behavior "Check Browser Brand"