canAcceptCommand()
Description
This function determines whether the command is appropriate for the current selection.
NOTE | Do not define |
Arguments
None.
Returns
Adobe Dreamweaver expects a true value if the command is allowed; if the value is false, Adobe Dreamweaver dims the command in the menu.
Example
The following example of the canAcceptCommand() function makes the command available only when the selection is a table:
function canAcceptCommand(){ var retval=false; var selObj=dw.getDocumentDOM.getSelectedNode(); return (selObj.nodeType == Node.ELEMENT_NODE && ¬ selObj.tagName=="TABLE");{ retval=true;}return retval;}