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
statement, Java applets, and ActiveX controls are not supported
document.write()
in extensions.
Displaying Help
The
displayHelp()
do the following two things when you include it in your extension:
Add a Help button to the interface.
Call
displayHelp()
You must write the body of the
function determines how your extension displays Help. You can call the
displayHelp()
dreamweaver.browseDocument()
to display Help such as displaying messages in another layer in alert boxes.
The following example uses the
dreamweaver.browseDocument()
// The following instance of displayHelp() opens a browser to display a file
// that explains how to use the extension.
function displayHelp() {
var myHelpFile = dw.getConfigurationPath() + "ExtensionsHelp/
myExtHelp.htm";
dw.browseDocument(myHelpFile);
}
Localizing an extension
Use the following techniques to make it easier to translate your extensions into local
languages.
Separate extensions into HTML and JavaScript files. The HTML files can be replicated
and localized; the JavaScript files are not localized.
Do not define display strings in the JavaScript files (check for alerts and UI code). Extract
all localizable strings into separate XML files in the Dreamweaver Configuration/Strings
folder.
at all times) are supported in the
function, which is part of several extension APIs, causes Dreamweaver to
when the user clicks the Help button.
displayHelp()
function to open a file in a browser or devise a custom way
displayHelp()
:
of extensions. The
BODY
function to display Help. How you code the
function to display Help by calling
Localizing an extension
107
Need help?
Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?
Questions and answers