Writing the JavaScript code
When the user selects either Undo or Redo on the MyMenu menu, Adobe Dreamweaver calls the MyMenu.htm command file, which is specified by the file attribute of the menuitem tag. Create the MyMenu.htm command file in the Adobe Dreamweaver Configuration/Menus folder and add the three menu command API functions, canAcceptCommand(), receiveArguments(), and setMenuText(), to implement the logic associated with the Undo and Redo menu items. The following sections describe these functions.