Specifications
Server Behaviors 157
dwscripts.applySB()
Availability
Dreamweaver MX (this function replaces applySB() from earlier versions of Dreamweaver)
Description
Inserts or updates runtime code for the server behavior. If the sbObj parameter is null, it inserts
new runtime code; otherwise, it updates existing runtime code that is indicated by the
sbObj
object. User settings should be set as properties on a JavaScript object and passed in as
paramObj.
These settings should match all the parameters that are declared as
@@paramName@@ in the EDML
insertion text.
Arguments
paramObj, sbObj
• paramObj is the object that contains the user parameters.
• sbObj is the prior server behavior object if you are updating an existing server behavior; null
otherwise.
Returns
true if the server behavior is added successfully to the user’s document; false otherwise.
Example
In the following example, you fill the paramObj with the user’s input and call
dwscripts.applySB, passing in the input and your server behavior, sbObj.
function applyServerBehaviors(sbObj) {
// get all UI values here...
paramObj = new Object();
paramObj.rs = rsName.value;
paramObj.col = colName.value;
paramObj.url = urlPath.value;
paramObj.form__tag = formObj;
dwscripts.applySB(paramObj, sbObj);
}
dwscripts.deleteSB()
Availability
Dreamweaver MX (this function replaces deleteSB() from earlier versions of Dreamweaver)
Description
Deletes all the participants of the sbObj server behavior instance. The entire participant is
deleted, unless the EDML file indicates special delete instructions with the
<delete> tag. It
does not delete participants that belong to more than one server behavior instance (reference
count > 1).
Arguments
sbObj is the server behavior object instance that you want to remove from the user’s document.
Returns
Nothing.