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
HTML Apps -> ChangeWidth
- Description
This function is used to set the width for the HTML component or gadget window.
- Syntax
ChangeWidth(newWidth)
- Parameters
Parameter
Description
Range
Type
newWidth
The new width (in pixels) of the HTML component or gadget
>= 0
int
- Return Value
None.
- Remarks
This function can be used both with the HTML component and with the gadget window.
*Notice: API methods must be invoked after the web page has triggered the "onload" event.
- Code Example
HTML
|
Gadget
This example contains two icons. Clicking on the first icon
will cause the HTML component's width to increase by 10px. Clicking on the second icon
will cause the HTML component's width to decrease by 10px.
This example contains an icon
that when clicked upon will open a Gadget Window that contains two buttons. Clicking on the first button will cause the width of the Gadget Window to increase by 10px. Clicking on the second button will cause the width of the Gadget Window to decrease by 10px.
<html> <head> <style type= "text/css"> BODY { margin-left:0; margin-right:0; margin-top:0; margin-bottom:0; width:100%; height:100%; overflow:hidden; background-color:threedface; } </style> </head> <body> <img alt="ChangeWidth - Increase" style="vertical-align:bottom" src="http://www.conduit.com/developers/api/Images/Toolbars/HTML/ChangeWidth1.gif" onclick="ChangeWidth(parseInt(GetCurrentWidth())+10)" /> <img alt="ChangeWidth - Decrease" style="vertical-align:bottom" src="http://www.conduit.com/developers/api/Images/Toolbars/HTML/ChangeWidth2.gif" onclick="ChangeWidth(parseInt(GetCurrentWidth())-10)" /> </body> </html>
<html> <head> <style type= "text/css"> BODY { margin-left:0; margin-right:0; margin-top:0; margin-bottom:0; width:100%; height:100%; overflow:hidden; background-color:threedface; } </style> </head> <body> <input type="button" value="Increase" onclick="ChangeWidth(parseInt(GetCurrentWidth())+10)" /> <input type="button" value="Decrease" onclick="ChangeWidth(parseInt(GetCurrentWidth())-10)" /> </body> </html>
- Code Usage
See code usage for HTML component
See code usage for gadget