Macromedia dreamweaver 8-extending dreamweaver User Manual

Page of 504
Item tag attributes
237
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.
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.
NO
TE
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.