A simple menu command example
197
5.
Dreamweaver calls the
receiveArguments()
function, if defined, in the selected Menu
Commands file to let the command process any arguments that pass from the menu item.
6.
Dreamweaver calls the
commandButtons()
function, if defined, to determine which
buttons appear on the right side of the Options dialog box and what code should execute
when the user clicks the buttons.
7.
Dreamweaver scans the Menu Commands file for a
FORM
tag.
If a form exists, Dreamweaver calls the
windowDimensions()
function to determine the
size of the Options dialog box that contains the
BODY
elements of the file.
If the
windowDimensions()
function is not defined, Dreamweaver automatically sizes the
dialog box.
8.
If the Menu Commands file’s
BODY
tag contains an
onLoad
handler, Dreamweaver executes
the associated code (whether or not a dialog box appears). If no dialog box appears, the
remaining steps do not occur.
9.
The user selects options in the dialog box. Dreamweaver executes event handlers that are
associated with the fields as the user encounters them.
10.
The user clicks one of the buttons that are defined by the
commandButtons()
function.
11.
Dreamweaver executes the code that is associated with the clicked button.
12.
The dialog box remains visible until one of the scripts in the Menu Commands file calls
the
window.close()
function.
A simple menu command example
This simple menu command example shows how Undo and Redo menu commands might
work. The Undo menu command reverses the effect of a user’s editing operation, and the
Redo item reverses an Undo operation and restores the effect of the user’s last editing
operation.
You can implement this example by performing the following steps:
■
Creating the menu commands
■
Writing the JavaScript code
■
Placing the command file in the Menu folder
NO
T
E
If it is a dynamic menu item, the ID of the menu item passes as the only argument.
Содержание DREAMWEAVER 8-EXTENDING DREAMWEAVER
Страница 1: ...Extending Dreamweaver...
Страница 8: ...8 Contents...
Страница 14: ...14 Introduction...
Страница 16: ......
Страница 54: ...54 Customizing Dreamweaver...
Страница 96: ...96 Customizing Code View...
Страница 98: ......
Страница 110: ...110 Extending Dreamweaver...
Страница 138: ......
Страница 166: ...166 Insert Bar Objects...
Страница 180: ...180 Commands...
Страница 248: ...248 Toolbars...
Страница 260: ...260 Reports...
Страница 278: ...278 Tag Libraries and Editors...
Страница 288: ...288 Property Inspectors...
Страница 378: ...378 Server Behaviors...
Страница 398: ...398 Data Sources...
Страница 432: ...432 Server Models...
Страница 456: ...456 Data Translators...
Страница 482: ......
Страница 492: ...492 The Shared Folder...