Apply the change property behavior, Apply the check browser behavior, Apply the check plugin behavior – Adobe Dreamweaver CC 2015 User Manual
Page 423
416
Javascript
Last updated 6/3/2015
Apply the Change Property behavior
Use the Change Property behavior to change the value of one of an object’s properties (for example, the background
color of a div or the action of a form).
Note: Use this behavior only if you are very familiar with HTML and JavaScript.
1
Select an object and choose Change Property from the Add Behavior menu of the Behaviors panel.
2
From the Type Of Element menu, select an element type to display all the identified elements of that type.
3
Select an element from the Element ID menu.
4
Select a property from the Property menu, or enter the name of the property in the box.
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.