From JavaScript, menu
is the name of the JavaScript object. You do not need to instantiate the menu
object before accessing it from JavaScript.
At the level of the M-Business Client main menu, you can control remove a menu so that it does not even appear. On platforms where a user action is required to display the M-Business Client main menu, you can customize the menu softkey label.
JavaScript commands that access the menu
object to customize the main menu take the following form:
menu.menu_function |
Valid values for menu_function are given in the following table.
menu_function |
Data type |
Description |
---|---|---|
|
string |
The menu softkey label displayed on platforms where a user action is required to display the M-Business Client main menu. |
|
boolean |
False for a menu that has been removed; true otherwise. |
|
void |
Removes the specified menu from the M-Business Client main menu. The menu is automatically restored in the user's next M-Business Client session, but cannot be restored in the current session. |
JavaScript commands that access the menu
object to customize individual menu items take the following form:
menu.menu_item.menu_item_function |
Valid values for menu_item and menu_item_function are given in the following two tables.
menu_function |
Data type |
Description |
---|---|---|
|
boolean |
Returns true if menu_item is enabled; false otherwise. Setting to true enables menu_item; setting to false disables it. On the menu items listed below, M-Business Client will override any changes in the menu item's enabled status that conflict with the device state. This will happen the first time that the user displays the menu containing that menu item, so the user will never see the conflicting setting.
|
|
string |
The label displayed for menu_item. |
|
boolean |
False if menu_item is unavailable on the current M-Business Client platform, or has been removed; true otherwise. |
|
void |
Removes menu_item from display in its M-Business Client menu. Removed menu items are automatically restored in the user's next M-Business Client session, but cannot be restored in the current session. |
menu_item |
Default menu label |
---|---|
|
About |
|
Add Bookmark |
|
Back |
|
Bookmark Manager |
|
Cache Manager |
|
Channel Manager |
|
Copy |
|
Cut |
|
Exit |
|
Find |
|
Find Next |
|
Find Previous |
|
Forms Manager |
|
Forward |
|
Full Screen |
|
Home |
|
Help |
|
Open Page |
|
Page Options |
|
Paste |
|
Reload Page |
|
Select All |
|
Server Options |
|
Sync All |
|
Work Offline |
|
Work Online |
Some menu items are not available across all M-Business Client platforms. For example, the Home menu item is not available
on Win32 devices. An attempt to access a missing menu item simply results in a no-op and does not cause any exceptions. Use
the isAvail()
method can use to test for the availability of a given menu item.
The valid labels for menu_item in the table above are based on their respective labels on the in M-Business Client on the Windows Mobile 5 and later platform family. Some menu items have different labels on other M-Business Client platforms. For example, the Page Options menu item is called Preferences, or just Options, on some platforms.
If you attempt to access a menu item that is not available, it results in a no-op that does not cause any exceptions. You
can use isAvail()
to determine the availability of a menu item.
Disable the Forms Manager menu item if it is enabled:
if(menu.formManager.enabled) menu.formManager.enabled = false; |
Remove the Forms Manager menu item completely:
menu.formManager.remove(); |
Change the label of the Sync All menu item:
menu.syncAll.label = "Update all channels"; |
Send feedback about this page using email. | Copyright © 2008, iAnywhere Solutions, Inc. |