isCommandChecked()
Description
Determines whether to display a check mark next to the menu item.
Arguments
{arg1}, {arg2},...{argN}
- If it is a dynamic menu item, the unique ID that the
getDynamicContents()function specifies is the only argument. Otherwise, if theargumentsattribute is defined for amenuitemtag, the value of that attribute passes to theisCommandChecked()function (and to the canAcceptCommand(), receiveArguments(), and setMenuText() functions) as one or more arguments. Theargumentsattribute is useful for distinguishing between two menu items that call the same menu command.NOTE
The
argumentsattribute is ignored for dynamic menu items.
Returns
Adobe Dreamweaver expects a Boolean value: true if a check mark should appear next to the menu item; false otherwise.
Example
function isCommandChecked(){ var bChecked = false; var cssStyle = arguments[0]; if (dw.getDocumentDOM() == null) return false; if (cssStyle == "(None)") { return dw.cssStylePalette.getSelectedStyle() == ''; } else { return dw.cssStylePalette.getSelectedStyle() == cssStyle; } return bChecked;}