JavaScript > JavaScript for Acrobat API Reference > JavaScript API > app > app methods > addSubMenu

addSubMenu
 
S
Adds a menu item with a submenu to the application.
See also the addMenuItem, execMenuItem, hideMenuItem, and listMenuItems methods.
Note: This method can only be executed during application initialization or console events. See the event object for a discussion of JavaScript events.
Parameters
 
The language-independent name of the menu item. This language-independent name is used to access the menu item (for example, for hideMenuItem).
(optional) The position within the parent’s submenu to locate the new submenu. The default is to append to the end of the parent’s submenu. Specifying nPos as 0 adds the submenu to the top of the parent’s submenu.
The nPos parameter is ignored in certain menus that are alphabetized. The alphabetized menus are
Note: When nPos is a number, nPos is not obeyed in the Tools menu. A menu item introduced into the Tools menu comes in at the top of the menu. nPos is obeyed when nPos is a string referencing another user-defined menu item.
Example
See the newDoc method.