Adobe 38040334 - Dreamweaver CS3 User Manual page 164

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

Advertisement

commandButtons()
Description
Defines the buttons that appear on the right side of the Options dialog box and their behavior when they are clicked.
If this function is not defined, no buttons appear, and the body section of the Menu Commands file expands to fill
the entire dialog box.
Arguments
None.
Returns
Dreamweaver expects an array that contains an even number of elements. The first element is a string that contains
the label for the topmost button. The second element is a string of JavaScript code that defines the behavior of the
topmost button when it is clicked. The remaining elements define additional buttons in the same manner.
Example
The following example of the
function commandButtons(){
return new Array("OK" , "doCommand()" , "Cancel" , ¬
"window.close()" , "Help" , "showHelp()");
}
getDynamicContent()
Description
Retrieves the content for the dynamic portion of the menu.
Arguments
menuID
The
argument is the value of the
menuID
Returns
Dreamweaver expects an array of strings where each string contains the name of a menu item and its unique ID,
separated by a semicolon. If the function returns a
Example
The following example of the
1, My Menu Item 2, My Menu Item 3, and My Menu Item 4):
function getDynamicContent(){
var stringArray= new Array();
var i=0;
var numItems = 4;
for (i=0; i<numItems;i++)
stringArray[i] = new String("My Menu Item " + i + ";¬
id='My-MenuItem" + i + "'");
return stringArray;
}
function defines the OK, Cancel, and Help buttons:
commandButtons()
attribute in the
id
null
function returns an array of four menu items (My Menu Item
getDynamicContent()
tag that is associated with the item.
menuitem
value, the menu does not change.
DREAMWEAVER CS3
158
Extending Dreamweaver

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents