getMenuItemById()

Description:

Call the getMenuItemById method with a specified menu item's identifier to retrieve the handle of the menu item instance.

For more general information on creating an options menu, see Using softkeys.

Syntax:

[MenuItem] window.menu.getMenuItemById(Integer id) 

or

[MenuItem] menu.getMenuItemById(Integer id)

Arguments:

  • id:

    This is the identifier of an existing menu item whose handle is being retrieved.

Return value:

The returned value is an instance of the existing MenuItem object. If the id is invalid, the method returns "undefined".

Example code:

See the example code in the description of the MenuItem.onSelect property.