O'Reilly logo

Dreamweaver in a Nutshell by Bruce A. Epstein, Heather Williamson

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

Browser Configuration Behaviors

Earlier, we saw the Call JavaScript behavior in action. Let’s explore three more DW behaviors, which, like all behaviors, are applied via the Behaviors panel. We’ll examine other behaviors in subsequent chapters.

Check Browser

The Check Browser behavior sends the user to different pages based on the browser’s brand and version. Applying the Check Browser behavior (typically to the <body> tag) opens the dialog box shown in Figure 12-9, where you can set its parameters.

Check Browser behavior parameters

Figure 12-9. Check Browser behavior parameters

This behavior splits visitors into three groups depending on whether you select the Stay On This Page, Go To URL, or Go To Alt URL option. You can change the version number used to discriminate between browsers (i.e., you don’t have to leave it at Version 4.0 for either brand, and it doesn’t need to be the same for both brands). You can use this behavior to separate users by brand, rather than by version, by sending all Netscape users to one URL and all Internet Explorer users to the Alt URL. You can apply the same behavior (with different parameters) to subsequent pages to discriminate even further.

Note that this behavior works with Version 3+ browsers, except for IE on the Macintosh, which requires Version 4 or later. Therefore IE3 on the Macintosh, like all browsers that don’t support JavaScript, will stay on the current page. You should ...

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