You are here: Reference > JavaScript > client-side > browser > objects > sidebar

sidebar object

Browser support:
Provides methods for registering add-ons with the Firefox browser.

Syntax:

Properties that reference the object:
window.external
window.sidebar

Possible members:

Methods:
addMicrosummaryGenerator
Installs a microsummary generator.
addPanel
Displays the 'Add Bookmark' dialog box for the specified URL and title in Firefox.
addPersistentPanel
Displays the 'Add Bookmark' dialog box for the specified URL and title in Firefox.
addSearchEngine
Installs a Sherlock formatted search engine plugin into the browser application.
AddSearchProvider
Installs a search engine plugin into the browser application.
IsSearchProviderInstalled
Returns an integer that represents whether the specified search provider is installed and whether it is the default.

Example HTML code 1:

This example shows how to add a page to the Favorites (Bookmarks) in Internet Explorer and Firefox.
<head>
    <script type="text/javascript">
        function AddToFavorites () {
            if (window.sidebar) {        // Firefox
                window.sidebar.addPanel ('Dottoro help page', 'http://help.dottoro.com', '');
            } 
            else {
                if (window.external && ('AddFavorite' in window.external)) {
                        // Internet Explorer
                    window.external.AddFavorite ('http://help.dottoro.com', 'Dottoro help page');
                }
                else {  // Opera, Google Chrome and Safari
                    alert ("Your browser doesn't support this example!");
                } 
            }
        }
   </script>
</head>
<body>
    <button onclick="AddToFavorites ();">Add to favorites</button>
</body>
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content