Specifications
Chapter 14150
• When the user clicks the plus (+) button in the Server Behaviors panel, the pop-up menu 
appears.
To determine the content of the menu, Dreamweaver first looks for a ServerBehaviors.xml file 
in the same folder as the behaviors. ServerBehaviors.xml references the HTML files that should 
appear in the menu.
If the referenced HTML file contains a title tag, the contents of the title tag appear in the 
menu. For example, if the ServerBehaviors/ASP_Js/ GetRecords.htm file contains the tag 
<title>Get More Records</title>, Get More Records appears in the menu.
If the file does not contain a title tag, the filename appears in the menu. For example, if 
GetRecords.htm does not contain a title tag, 
GetRecords appears in the menu.
If there is no ServerBehaviors.xml file or the folder contains one or more HTML files that are 
not mentioned in ServerBehaviors.xml, Dreamweaver checks each file for a title tag and uses 
the title tag or filename to populate the menu. 
If you do not want a file in the ServerBehaviors folder to appear in the menu, put the following 
statement on the first line in the HTML file:
<!-- MENU-LOCATION=NONE --> 
• When the user chooses an item from the menu, the canApplyServerBehavior() function is 
called. If that function returns 
true, a dialog box appears. When the user clicks OK, the 
applyServerBehavior() function is called.
• If the user edits an existing server behavior by double-clicking it, Dreamweaver displays the 
dialog box, executes the 
onLoad handler on the BODY tag, if one exists, and then calls 
inspectServerBehavior(). The inspectServerBehavior() function populates the form 
elements with the current parameter values. When the user clicks OK, Dreamweaver calls 
applyServerBehavior() again.
• If the user clicks the minus (-) button, the deleteServerBehavior() function is called. The 
deleteServerBehavior() function removes the behavior from the document.
• When the user selects a server behavior and uses the Cut or Copy commands, Dreamweaver 
passes the object that represents the server behavior to its 
copyServerBehavior() function. 
The 
copyServerBehavior() function adds any additional properties to the server behavior 
object that are needed to paste it later.
After the 
copyServerBehavior() function returns, Dreamweaver converts the server behavior 
object to a form that can be put on the Clipboard. When Dreamweaver converts the object, it 
deletes all the properties that reference objects; every property on the object that is not a 
number, Boolean value, or string is lost.
When the user uses the Paste command, Dreamweaver unpacks the contents of the Clipboard 
and generates a new server behavior object. The new object is identical to the original, except 
that it does not have properties that reference objects. Dreamweaver passes the new server 
behavior object to 
pasteServerBehavior(). The pasteServerBehavior() function adds 
the behavior to the user’s document. After 
pasteServerBehavior() returns, Dreamweaver 
calls the 
findServerBehaviors() function to get a new list of all the server behaviors in the 
user’s document.
Users can copy and paste behaviors from one document to another. The 
copyServerBehavior() 
and 
pasteServerBehavior() functions should rely only on properties on the behavior object to 
exchange information.










