You are here: Reference > JavaScript > client-side > browser > methods > AddDesktopComponent (external)

AddDesktopComponent method (external)

Browser support:
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.


object.AddDesktopComponent (URL, type [, left [, top [, width [, height]]]]);
You can find the related objects in the Supported by objects section below.


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:
Item is an image.
Item is a website.
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:
    <script type="text/javascript">
        function AddWebSiteToDesktop () {
            try {
                window.external.AddDesktopComponent ("", "website", 50, 50, 300, 300);
            catch (e) {
                alert (e.message);

    <button onclick="AddWebSiteToDesktop ();">Add a website to the Desktop!</button>
Did you find this example helpful? yes no

Supported by objects:

External links:

User Contributed Comments

Post Content

Post Content