Specifications
551
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.serverBehaviorInspector.getServerBehaviors()
Availability
Dreamweaver UltraDev 1
Description
Gets a list of all the behaviors on the page. When Dreamweaver determines that the internal list
of server behaviors might be out of date, it calls
findServerBehaviors() for each currently
installed behavior. Each function returns an array. Dreamweaver merges all the arrays into a
single array and sorts it, based on the order that each behavior’s
selectedNode object appears in
the document. Dreamweaver stores the merged array internally. The
getServerBehaviors()
function returns a pointer to that merged array.
Arguments
None.
Returns
An array of JavaScript objects. The objects in the array are returned by the
findServerBehaviors() call. The objects are sorted in the order that they appear in the Server
Behaviors panel.
dreamweaver.popupServerBehavior()
Availability
Dreamweaver UltraDev 1
Description
Applies a new server behavior to the document or modifies an existing behavior. If the user must
specify parameters for the behavior, a dialog box appears.
Arguments
{behaviorName or behaviorObject}
• behaviorName is a string that represents the behavior’s name, the title tag of a file, or a
filename.
• behaviorObject is a behavior object.
If you omit the argument, Dreamweaver runs the currently selected server behavior. If the
argument is the name of a server behavior, Dreamweaver adds the behavior to the page. If the
argument is one of the objects in the array that is returned by
getServerBehaviors(), a dialog
box appears, so the user can modify the parameters for the behavior.
Returns
Nothing.