336
Chapter 16: Dynamic Documents
Server behavior functions
Server behavior functions let you manipulate the Server Behaviors panel, which you can display
by selecting Window > Server Behaviors. Using these functions, you can find all the server
behaviors on a page and programmatically apply a new behavior to the document or modify an
existing behavior.
Note:
You can abbreviate
dw.serverBehaviorInspector
to
dw.sbi
.
dreamweaver.getParticipants()
Availability
Dreamweaver UltraDev 4.
Description
The JavaScript function,
dreamweaver.getParticipants()
, gets a list of participants from the
user’s document. After Dreamweaver finds all the behavior’s participants, it stores those lists.
Typically, you use this function with the
findServerBehaviors()
function (for more
information, see “Server Behaviors” in
Extending Dreamweaver
) to locate instances of a behavior
in the user’s document.
Arguments
edmlFilename
•
The
edmlFilename
argument is the name of the group or participant file that contains the
names of the participants to locate in the user’s document. This string is the filename, without
the .edml extension.
Returns
This function returns an array that contains all instances of the specified participant (or, in the
case of a group file, any instance of any participant in the group) that appear in the user’s
document. The array contains JavaScript objects, with one element in the array for each instance
of each participant that is found in the user’s document. The array is sorted in the order that the
participants appear in the document. Each JavaScript object has the following properties:
•
The
participantNode
property is a pointer to the participant node in the user’s document.
•
The
participantName
property is the name of the participant’s EDML file (without the .edml
extension).
•
The
parameters
property is a JavaScript object that stores all the parameter/value pairs.
•
The
matchRangeMin
property defines the character offset from the participant node of the
document to the beginning of the participant content.
•
The
matchRangeMax
property is an integer of the participant that defines the offset from the
beginning of the participant node to the last character of the participant content.
000_DW_API_Print.book Page 336 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...