308
Chapter 15: Page Content
dreamweaver.behaviorInspector.getBehaviorAt()
Availability
Dreamweaver 3.
Description
Gets the event/action pair at the specified position in the Behaviors panel.
Arguments
positionIndex
•
The
positionIndex
argument is the position of the action in the Behaviors panel. The first
action in the list is at position 0.
Returns
An array of two items:
•
An event handler
•
A function call or JavaScript statement
Example
Because
positionIndex
is a zero-based index, if the Behaviors panel displays the list, a call to the
dreamweaver.behaviorInspector.getBehaviorAt(2)
function returns an array that contains
two strings:
"onMouseOver"
and
"MM_changeProp('document.moon','document.moon','src','sun.gif','MG')"
.
dreamweaver.behaviorInspector.getBehaviorCount()
Availability
Dreamweaver 3.
Description
Counts the number of actions that are attached to the currently selected element through
event handlers.
Arguments
None.
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.
000_DW_API_Print.book Page 308 Wednesday, August 20, 2003 9:14 AM
Summary of Contents for DREAMWEAVER MX 2004-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 24: ...24 Contents...
Page 32: ......
Page 70: ...70 Chapter 5 Fireworks Integration...
Page 76: ...76 Chapter 6 Flash Integration...
Page 116: ...116 Chapter 9 The JavaBeans API...
Page 140: ......
Page 152: ...152 Chapter 11 Application...
Page 218: ...218 Chapter 12 Workspace...
Page 248: ...248 Chapter 13 Site...
Page 292: ...292 Chapter 14 Document...
Page 378: ...378 Chapter 17 Design...
Page 430: ...430 Chapter 18 Code...
Page 486: ...486 Index...