Join
Log In
> -->>
Log Out
Support
Help
Conduit
Mobile
Wibiya
How It Works
Benefits
Features
Showcase
Contact Us
Conduit API
Introduction
HTML App
Using Advanced APIs
Introduction
+ Methods
EBOpenPopHtml
Introduction
+ Methods
AddAlert
AddApplicationMenuItem
AddCommandMenuItem
AddGadget
AddGadgetMenuItem
AddLinkButton
AddLinkMenuItem
AddRadioStation
AddRSS
GetAllToolbarsInfo
GetInfo
GetSupportedUserAddMenu
IsSupportedFunction
IsVisible
Refresh
Developing the game
+ Methods
ChangeHeight
ChangeSize
CloseFloatingWindow
GetCurrentHeight
Gadget
Introduction
HTML Apps Height
XML Specifications
Code Usage
Create HTML component
Error Code Table
Glossary
Code Example
+ Methods
CrossDomainHttpRequest
GetInfo
SendNotification
RegisterForMessaging
SendMessage
JSInjection
ChangeWidth
DeleteGlobalKey
DeleteKey
GetCurrentWidth
GetMainFrameTitle
GetMainFrameUrl
GetSearchTerm
GetVersion
OpenGadget
RefreshComponentById
RefreshToolbar
RetrieveGlobalKey
RetrieveKey
SelfNavigate
StoreGlobalKey
StoreKey
Code Usage
+ Events
EBKeyChanged
EBTabRestored
EBDocumentComplete
EBGlobalKeyChanged
EBNavigateComplete
EBSearchTermChanged
Code Usage
Flash plugin behavior
Embeding Flash
+ ASP.Net
+ ExternalMenu
+ Constructors
ExternalMenuCtor
+ EM_Button
EM_Button
+ Properties
ButtonTooltip
DefaultButtonText
DefaultIconUrl
+ EM_Menu
+ Constructors
EM_MenuCtor
EM_Menu
+ EM_MenuItem
+ Constructors
EM_MenuItemCtor
+ EM_Data
EM_Data
+ EM_Link
+ Constructors
EM_LinkCtor
EM_Link
+ Enums
LinkType
+ Properties
Target
Url
+ EM_PopHtml
+ Constructors
EM_PopHtmlCtor
EM_PopHtml
+ Properties
Height
Url
Width
+ Enums
DataType
+ Properties
Link
PopHtml
Type
EM_MenuItem
+ Properties
Caption
Data
IconUrl
+ EM_Separator
+ Constructors
EM_SeparatorCtor
EM_Separator
+ Properties
Caption
Hint
IconUrl
MenuItems
+ Enums
MenuType
ExternalMenu
+ Methods
GetXml
+ Properties
Button
ExternalInterval
Menu
Type
Live Demo Usage
Targets
Detecting Flash version
Conduit API
Code Usage
Security Settings
Show Hide mechanism
Where to go from here
Facebook
Toolbar
Case Study
Introduction
Introduction
Online users
Add user Login
Add Quick Search
Add user Messages
Web Page API -> AddGadgetMenuItem
- Description
This function is used to add a Customized Gadget Menu item to the dynamic menu.
- Syntax
AddGadgetMenuItem(uniqueComponentID
menuItemCaption,
menuItemIconUrl,
linkUrl,
width,
height,
defaultTarget)
- Parameters
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
- Return Value
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
- Remarks
*Notice: API methods must be invoked after the web page has triggered the "onload" event.
- Code Example
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
.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Conduit Toolbar API - AddCommandMenuItem</title> </head> <body> <div><input type="button" value="Add Gadget Item" onclick="AddGadgetMenuItemToToolbar()" /></div> <br /> <div id="result"></div> </body> </html>
- Code Usage
See code usage
See live demo usage
Live example