You are here: Reference > JavaScript > client-side > browser > properties > external (window)

external property (window)

Browser support:
Returns a reference to the external object in Internet Explorer and the sidebar object in Firefox.
In Firefox, the window.sidebar and the window.external properties are also refer to the sidebar object. The external and sidebar objects a little bit similar, both of them support the AddSearchProvider or IsSearchProviderInstalled methods. Therefore sometimes is more comfortable to use the sidebar object through the window.external property in Firefox.

Syntax:

object.external;
You can find the related objects in the Supported by objects section below.
This property is read/write.

Possible values:

Reference to the external or sidebar object.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the external and sidebar objects and the AddSearchProvider method.
Code
searchProvider.xml
<head>
    <script type="text/javascript">
        function AddSearch () {
            if (window.external && ('AddSearchProvider' in window.external)) {
                window.external.AddSearchProvider ("searchProvider.xml");
            }
            else {
                alert ("Your browser does not support the AddSearchProvider method!");
            }
        }
   </script>
</head>
<body>
    <button onclick="AddSearch ()">Add search engine</button>
    <br /><br />
    To manage search engines, open the drop-down menu of your browser's Search Box (Firefox and Internet Explorer)
    or select Options/Basics/Default Search/Manage (Google Chrome).
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content