Example
// the following instance of displayHelp() opens
// in a browser a file that explains how to use
// the extension.
function displayHelp(){
var myHelpFile = dw.getConfigurationPath() +
'/ExtensionsHelp/superDuperHelp.htm';
dw.browseDocument(myHelpFile);
}
documentEdited()
Description
This function is called when the floating panel becomes visible and after the current series of edits
is complete; that is, multiple edits might occur before this function is called. This function should
be defined only if the floating panel must track edits to the document.
Note: Define the
impacts performance.
Arguments
None.
Returns
Dreamweaver expects nothing.
Example
The following example of the
updates a text field that displays the number of layers in the document:
function documentEdited(){
/* create a list of all the layers in the document */
var theDOM = dw.getDocumentDOM();
var layersInDoc = theDOM.getElementsByTagName("layer");
var layerCount = layersInDoc.length;
/* update the numOfLayers field with the new layer count */
document.theForm.numOfLayers.value = layerCount;
}
getDockingSide()
Availability
Dreamweaver MX.
Description
Specifies the locations at which a floating panel can dock. The function returns a string that
contains some combination of the words
the string, you can dock a floating panel to that side. If the function is missing, you cannot dock
a floating panel to any side.
You can use this function to prevent certain panels from docking on a certain side of the
Dreamweaver workspace or to each other.
function only if you require it because its existence
documentEdited()
documentEdited()
function scans the document for layers and
"left"
,
"right"
,
"top"
, and
"bottom"
. If the label is in
The Floating panel API
225
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