Dwscripts.deletesb(), For more information, see – Adobe Extending Dreamweaver CS4 User Manual
Page 263

257
EXTENDING DREAMWEAVER CS4
Server behaviors
Arguments
paramObj, sbObj
•
The paramObj argument is the object that contains the user settings.
•
The sbObj argument is the prior server behavior object if you are updating an existing server behavior;
null
otherwise.
Returns
Dreamweaver expects a Boolean value:
true
if the server behavior is added successfully to the user’s document;
false
otherwise.
Example
In the following example, you fill the
paramObj
object with the user’s input and call the
dwscripts.applySB()
function, 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 the
deleteSB()
function 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
•
The sbObj argument is the server behavior object instance that you want to remove from the user’s document.
Returns
Dreamweaver expects nothing.
Example
The following example deletes all the participants of the
sbObj
server behavior, except the participants that are
protected by the EDML file’s
delete
tag.
function deleteServerBehavior(sbObj) {
dwscripts.deleteSB(sbObj);
}