Behavior functions
375
Returns
An integer that represents the number of actions that are attached to the element. This
number is equivalent to the number of actions that are visible in the Behaviors panel and
includes Dreamweaver behavior actions and custom JavaScript.
Example
A call to
dreamweaver.behaviorInspector.getBehaviorCount()
for the selected link
<A
HREF="javascript:setCookie()" onClick="MM_popupMsg('A cookie has been
set.');parent.rightframe.location.href='aftercookie.html'">
returns 2.
dreamweaver.behaviorInspector.getSelectedBehavior()
Availability
Dreamweaver 3.
Description
Gets the position of the selected action in the Behaviors panel.
Arguments
None.
Returns
An integer that represents the position of the selected action in the Behaviors panel, or –1 if
no action is selected.
Example
If the first action in the Behaviors panel is selected, as shown in the following figure, a call to
the
dreamweaver.behaviorInspector.getSelectedBehavior()
function returns 0:
000_DW_API_Print.book Page 375 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...