How Dreamweaver processes JavaScript in extensions
Dreamweaver checks the Configuration/extension_name folder during startup. If it encounters an
extension file within the folder, Dreamweaver processes the JavaScript by completing the
following steps:
•
Compiling everything between the beginning and ending
•
Executing any code within
Note: This procedure is necessary during startup because some extensions might require global
variables to initialize.
Dreamweaver performs the following actions for any external JavaScript files that are specified in
the
attributes of
SRC
•
Reads in the file
•
Compiles the code
•
Executes the procedures
Note: If any JavaScript code in your extension file contains the string
JavaScript interpreter reads the string as an ending
string literal error. To avoid this problem, break the string into pieces and concatenate them like
this:
"<' + '/SCRIPT>"
Dreamweaver executes code in the
the user selects the command or action from a menu for the Command and Behavior action
extension types.
Dreamweaver executes code in the
document contains a form for object extensions.
Dreamweaver ignores the
•
Data translator
•
Property inspector
•
Floating panel
For all extensions, Dreamweaver executes code in other event handlers (for example,
onBlur="alert('This is a required field.')"
fields to which they are attached.
Dreamweaver supports the use of event handlers within links. Event handlers in links must use
syntax, as shown in the following example:
<a href="#" onMouseDown=alert('hi')>link text</a>
Plug-ins (set to
play
document.write()
in extensions.
26
Chapter 2: Extending Dreamweaver
tags that is not part of a function declaration
SCRIPT
tags:
SCRIPT
.
onLoad
onLoad
handler on the
onLoad
at all times) are supported in the
statement, Java applets, and ActiveX controls are not supported
SCRIPT
tag and reports an unterminated
SCRIPT
event handler (if one appears in the
event handler on the
BODY
tag in the following extensions:
BODY
) when the user interacts with the form
of extensions. The
BODY
tags
, the
"</SCRIPT>"
tag) when
BODY
tag if the body of the
Need help?
Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?
Questions and answers