Adobe 38040334 - Dreamweaver CS3 User Manual page 136

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

Advertisement

The next part of the
return
selected node type is text. If so, the
text, the test continues to see if the node has children (
first child node is text (
(
&&
returns the value
canAcceptCommand()
Commands menu, as shown in the following figure:
Otherwise,
canAcceptCommand()
following figure:
Linking functions to the OK and Cancel buttons
When the user clicks OK or Cancel, the extension needs to perform the appropriate action. You determine the appro-
priate action by specifying which JavaScript function to perform when either button is clicked.
To link the OK and Cancel button to functions:
1
Open the file Change Case.js in the Configuration/Commands folder.
At the end of the file, add the following code:
2
function commandButtons() {
return new Array("OK", "changeCase()", "Cancel", "window.close()");
}
statement (
&& (theSelNode.nodeType == Node.TEXT_NODE
canAcceptCommand()
theChildren[0].nodeType == Node.TEXT_NODE))
, and Dreamweaver enables the menu item at the bottom of the
true
returns the value
false
function returns the value
|| theSelNode.hasChildNodes()
and Dreamweaver dims the item, as shown in the
DREAMWEAVER CS3
Extending Dreamweaver
) checks to see if the
. If the node type is not
true
), and if the type of the
). If both conditions are true,
130

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents