Macromedia Dreamweaver MX 2004 commands can perform almost any kind of edit to a user's
current document, other open documents, or any HTML document on a local drive. Commands
can insert, remove, or rearrange HTML tags and attributes, comments, and text.
Commands are HTML files. The
that accepts options for the command (for example, how a table should be sorted and by which
column). The
HEAD
input from the
BODY
How commands work
When a user clicks a menu that contains a command, the following events occur:
Dreamweaver calls the
1
item should be disabled. If the
command is dimmed in the menu, and the procedure stops. If the
function returns a
The user selects a command from the menu.
2
Dreamweaver calls the
3
file to let the command process any arguments that pass from the menu item or from the
dreamweaver.runCommand()
dreamweaver.runCommand()
Dreamweaver calls the
4
appear on the right side of the Options dialog box and what code should execute when the user
clicks the buttons.
Dreamweaver scans the command file for a
5
windowDimensions()
elements of the file. If the
automatically sizes the dialog box.
If the command file's
6
or not a dialog box appears). If no dialog box appears, the remaining steps do not occur.
The user selects options for the command. Dreamweaver executes event handlers that are
7
associated with the fields as the user encounters them.
The user clicks one of the buttons that is defined by the
8
Dreamweaver executes the associated code. The dialog box remains visible until one of the
9
scripts in the command calls the
section of a command file can contain an HTML form
BODY
section of a command file contains JavaScript functions that process form
section and control what edits are made to the user's document.
canAcceptCommand()
canAcceptCommand()
value, the procedure can continue.
true
receiveArguments()
function. For more information on the
function, see the Dreamweaver API Reference.
commandButtons()
function, which sizes the Options dialog box that contains the
windowDimensions()
tag contains an
BODY
window.close()
function to determine whether the menu
function returns a
function, if defined, in the selected Command
function, if defined, to determine which buttons
tag. If a form exists, Dreamweaver calls the
FORM
function is not defined, Dreamweaver
handler, Dreamweaver executes it (whether
onLoad
commandButtons()
function.
CHAPTER 7
Commands
value, the
false
canAcceptCommand()
BODY
function.
135
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