MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual page 314

Extending dreamweaver
Table of Contents

Advertisement

behaviorFunction()
Description
This function inserts one or more functions—surrounded by the following tags, if they don't
yet exist—into the
HEAD
<SCRIPT LANGUAGE="JavaScript"></SCRIPT>
Arguments
None.
Returns
Dreamweaver expects either a string that contains the JavaScript functions or a string that
contains the names of the functions to be inserted in the user's document. This value must be
exactly the same every time (it cannot depend on user input). The functions are inserted only
once, regardless of how many times the action is applied to elements in the document.
Quotation marks ("")within the returned string must be preceded by a backslash (\)
escape character to avoid errors that the JavaScript interpreter reports.
Example
The following instance of the
function:
function behaviorFunction(){
return ""+
"function MM_popupMsg(theMsg) { //v1.0\n"+
"
alert(theMsg);\n"+
"}";
}
The following example is equivalent to the preceding
is the method used to declare the
with Dreamweaver:
function MM_popupMsg(theMsg){ //v1.0
alert(theMsg);
}
function behaviorFunction(){
return "MM_popupMsg";
}
314
Behaviors
section of the user's document:
behaviorFunction()
behaviorFunction()
function returns the
MM_popupMsg()
behaviorFunction()
function in all behaviors that come
declaration and

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver 8

Table of Contents