Adobe 38040334 - Dreamweaver CS3 User Manual page 247

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

// reference, a dependent URL, and perhaps a property value
// such as "show" or "hide") to the existing list of argument
// types, or if no list yet exists, add only
// "NS4.0ref,IE4.0ref,other,dep"
var listOfArgTypes += ((listOfArgTypes)?",":"") + ¬
"NS4.0ref,IE4.0ref,other,dep";
}
}
inspectBehavior()
Description
This function inspects the function call for a previously applied behavior in the user's document and sets the values
of the options in the Parameters dialog box accordingly. If the
default option values appear.
Note: The
inspectBehavior()
passes to it. Do not attempt to obtain other information about the user's document (for example, using
dreamweaver.getDocumentDOM()
Arguments
applyBehaviorString
This argument is the string that the
Note: If the HTML element contains code that is similar to '
document.MM_returnValue;"'
as soon as the new behavior UI pops up, and passes an empty string as the parameter. Conse-
inspectBehavior()
quently, be sure to check the
function inspectBehavior(enteredStr){
if(enteredStr){
//do your work here
}
}
Returns
Dreamweaver expects nothing.
Example
The following instance of the
the Message field in the Parameters dialog box with the message that the user selected when the behavior was origi-
nally applied:
function inspectBehavior(msgStr){
var startStr = msgStr.indexOf("'") + 1;
var endStr = msgStr.lastIndexOf("'");
if (startStr > 0 && endStr > startStr) {
document.theForm.message.value = ¬
unescQuotes(msgStr.substring(startStr,endStr));
}
}
function must rely solely on information that the
) within this function.
applyBehavior()
, and you add a new behavior from the behavior menu, Dreamweaver calls
parameter, as shown in the following example:
applyBehaviorString
function, taken from the Display Status Message.htm file, fills in
inspectBehavior()
inspectBehavior()
applyBehaviorString
function returns.
onClick="someBehavior(); return
DREAMWEAVER CS3
Extending Dreamweaver
function is not defined, the
argument
241

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents