You are here: Reference > JavaScript > client-side > browser > methods > AddDesktopComponent (external)
AddDesktopComponent method (external)
Adds an item (image or website with location) to the Microsoft Active Desktop.
Active Desktop needs to be installed in the user's computer for the AddDesktopComponent method to work.
The Active Desktop has limited functionality (does not support the AddDesktopComponent method) on Windows XP with SP2 and it is removed from Windows Vista.
Syntax:
You can find the related objects in the Supported by objects section below.
Parameters:
Required. String that specifies the location of a Web site or image. | |||||||||||||||||||||||
Required. String that specifies the type of the item to add.
One of the following values:
|
|||||||||||||||||||||||
Optional. Integer that sets the left position. | |||||||||||||||||||||||
Optional. Integer that sets the top position. | |||||||||||||||||||||||
Optional. Integer that sets the width of the item. | |||||||||||||||||||||||
Optional. Integer that sets the height of the item. |
Return value:
This method has no return value.
Example HTML code 1:
This example illustrates the use of the AddDesktopComponent method:
|
||||
<head> <script type="text/javascript"> function AddWebSiteToDesktop () { try { window.external.AddDesktopComponent ("http://help.dottoro.com", "website", 50, 50, 300, 300); } catch (e) { alert (e.message); } } </script> </head> <body> <button onclick="AddWebSiteToDesktop ();">Add a website to the Desktop!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
External links:
User Contributed Comments