User Guide
186 Chapter 9: Toolbars
The following list shows the possible handlers for update_frequency_list, from least to most
frequent. If you do not specify the
update attribute, the update frequency defaults to onEdit
frequency. You can specify multiple update frequencies, separated by commas. The handlers run
on any of the following specified events:
• onServerModelChange executes when the server model of the current page changes.
• onCodeViewSyncChange executes when the Code view becomes in or out of sync with the
Design view.
• onViewChange executes whenever the user switches focus between Code view and Design view
or when the user changes between Code view, Design view, or Split view.
• onEdit executes whenever the document is edited in Design view. Changes that you make in
Code view do not trigger this event.
• onSelChange executes whenever the selection changes in Design view. Changes that you make
in Code view do not trigger this event.
• onEveryIdle executes regularly when the application is idle. This can be time-consuming
because the
enabler/checked/showif/value handlers are running often. It should be used
only for buttons that need to have their enable state changed at special times, and handlers
should be quick.
Note: In all these cases, Dreamweaver actually executes the handlers after the specified event
occurs, when the application is in a quiescent state. It is not guaranteed that your handlers run after
every edit or selection change; your handlers run soon after a batch of edits or selection changes
occur. The handlers are guaranteed to run when the user clicks on a toolbar item.
Example
update="onViewChange"
command="script"
This attribute is required for all items except menu buttons. Dreamweaver ignores the
command
attribute for menu buttons. Specifies the JavaScript function to execute when the user performs
one of the following actions:
• Clicks a button
• Selects an item from a pop-up menu or combo box
• Tabs out of, presses Return in, or clicks away from a text box or combo box
• Selects a color from a color picker
The
command attribute is equivalent to the receiveArguments() function in a toolbar
command file.
Example
command="dw.toggleLiveDebug()"
arguments="argument_list"
Optional. This attribute specifies the comma-separated list of arguments to pass to
the
receiveArguments() function in a toolbar command file. If you do not specify the
arguments attribute, Dreamweaver passes the ID of the toolbar item. In addition, pop-up menus,
combo boxes,
text boxes, and color pickers pass their current value as the first argument, before
any arguments that the
arguments attribute specifies, and before the item ID if no arguments
are specified.