Operation Manual
332
USING DREAMWEAVER
Adding JavaScript behaviors
Last updated 3/28/2012
5 Enter the new value for the new property in the New Value field.
6 Click OK and verify that the default event is correct.
Apply the Check Browser behavior
This behavior has been deprecated as of Dreamweaver CS5.
Apply the Check Plugin behavior
Use the Check Plugin behavior to send visitors to different pages depending on whether they have the specified plug-in
installed. For example, you might want visitors to go to one page if they have Shockwave and another page if they do not.
Note: You cannot detect specific plug-ins in Internet Explorer using JavaScript. However, selecting Flash or Director will
add the appropriate VBScript code to your page to detect those plug-ins in Internet Explorer on Windows. Plug-in
detection is impossible in Internet Explorer on Mac
OS.
1 Select an object and choose Check Plugin from the Add Behavior menu of the Behaviors panel.
2 Select a plug-in from the Plugin menu, or click Enter and type the exact name of the plug-in in the adjacent box.
You must use the exact name of the plug-in as specified in bold on the About Plug-ins page in Netscape Navigator. (In
Windows, select Navigator’s Help
> About Plug-ins command; on Mac OS, select About Plug-ins from the Apple
menu.)
3 In the If Found, Go To URL box, specify a URL for visitors who have the plug-in.
If you specify a remote URL, you must include the http:// prefix in the address. If you leave the field blank, visitors will
stay on the same page.
4 In the Otherwise, Go To URL box, specify an alternative URL for visitors who don’t have the plug-in. If you leave
the field blank, visitors will stay on the same page.
5 Specify what to do if plug-in detection is not possible. By default, when detection is impossible, the visitor is sent to
the URL listed in the Otherwise box. To instead send the visitor to the first (If Found) URL, select the option Always
Go To First URL If Detection Is Not Possible. When selected, this option effectively means “assume that the visitor
has the plug-in, unless the browser explicitly indicates that the plug-in is not present.” In general, select this option
if the plug-in content is integral to your page; if not leave it deselected.
Note: This option applies only to Internet Explorer; Netscape Navigator can always detect plug-ins.
6 Click OK and verify that the default event is correct.
Apply the Control Shockwave or SWF behavior
This behavior has been deprecated as of Dreamweaver CS5.
Apply the Drag AP Element behavior
The Drag AP Element behavior lets the visitor drag an absolutely positioned (AP) element. Use this behavior to create
puzzles, slider controls, and other movable interface elements.
You can specify in which direction the visitor can drag the AP element (horizontally, vertically, or in any direction), a
target to which the visitor should drag the AP element, whether to snap the AP element to the target if the AP element
is within a certain number of pixels of the target, what to do when the AP element hits the target, and more.