Conduit API
Case Study
Web Page API -> AddGadgetMenuItem
 
This function is used to add a Customized Gadget Menu item to the dynamic menu.
 
AddGadgetMenuItem(uniqueComponentID
menuItemCaption,
menuItemIconUrl,
linkUrl,
width,
height,
defaultTarget)
 
Parameter Description Range Type
uniqueComponentID The dynamic menu’s unique ID. The new item is added to this dynamic menu not null or empty string
menuItemCaption The text to display on the dynamic menu item not null or empty string
menuItemIconUrl The URL of the icon which is displayed on the dynamic menu item not null or empty string
linkUrl The URL of the web page which is displayed, when selecting this gadget not null or empty string
width The width of the Gadget (in pixels) >0 int
height The height of the Gadget (in pixels) >0 int
defaultTarget A Gadget is an HTML document that may include links. The default target for these links can be one of the following:
1. _self - Displays the link in the same window or frame that contains the Gadget
2. _main - Displays the link in the full browser window, replacing the current page
3. _new - Displays the link in a new browser window
Default: _self.
Optional. string
 
An object that contains the following fields:
Field Name Description Type
returnValue Indicates whether the operation was successful.
True - The function adds a customized Gadget menu item to the dynamic menu
False - The menu item is not added to the dynamic menu. Check the value of the errorCode to determine the specific reason for the function failure
boolean
errorCode
Specific error code. See Error Code Table for additional information.
int
 
*Notice: API methods must be invoked after the web page has triggered the "onload" event.
 
This example contains a button that when clicked upon will insert a Gadget Menu item for each available dynamic menu on the Conduit demo toolbar.