window.external Using the complete book

AddFavorite, a script that adds websites to the viewer’s favorites, should be seen often, but do you know some other uses of window.external? Since it is a command for system file manipulation, some scripts may have errors due to security settings.

1.external.AddDesktopComponent Make the site the user’s Active desktop

Syntax:external.AddDesktopComponent(address, type [image/website], left distance, top distance, width, length)

function j_adc(){ //example

window.external.AddDesktopComponent(“http://…”,”website”,0,0,800,600);

}

2.external.AddFavorite Add the site to the user’s favorites

Syntax:external.AddFavorite(url, title);

function j_af(){

window.external.AddFavorite(location.href, document.title);

}

3.external.NavigateAndFind Search for a field in a given site

Syntax:external.NavigateAndFind(file address, keyword_Target´╝ë

function j_an(){

window.external.NavigateAndFind(“http://…”,gosearch.value,””);

}

4.external.ShowBrowserUI Calling the language selection window and the favorites management window

Syntax:external.ShowBrowserUI(type[LanguageDialog/OrganizeFavorites], null)

<input type=”button” name=”Button” value=”setting language” onclick=”window.external.ShowBrowserUI(‘LanguageDialog’, null)”&>

<input type=”button” name=”Submit2″ value=”Organize Favorites” onclick=”window.external.ShowBrowserUI(‘OrganizeFavorites’, null)”&>

5.external.ImportExportFavorites Importing and exporting user favorites

Syntax:external.ImportExportFavorites(import/true export/false, file path)

<input type=”button” name=”Button” value=”Import Favorites”

onClick=window.external.ImportExportFavorites(true,”http://…”);&>

<input type=”button” name=”Button3″ value=”export Favorites”

onClick=window.external.ImportExportFavorites(false,”http://…”);&>

6.external.addChanne add to your channel

Syntax:external.addChannel(page path)

7. Here is the list of all methods of the external object

Method Description
AddChannel Obsolete. Presents a dialog box that enables the user to add the specified channel, or to change the channel URL, if it is already installed.
AddDesktopComponent Adds a Web site or image to the Microsoft Active Desktop.
AddFavorite Prompts the user with a dialog box to add the specified URL to the Favorites list.
AddSearchProvider Adds a search provider to the registry.
AddService User initiated action to add a service.
AddToFavoritesBar Adds a URL to the Favorites Bar.
AutoCompleteSaveForm Saves the specified form in the AutoComplete data store.
AutoScan No longer available as of Internet Explorer 7. Attempts to connect to a Web server by passing the specified query through completion templates.
BrandImageUri Not supported. Retrieves the Uniform Resource Identifier (URI) of an alternate product image.
bubbleEvent Propagates an event up its containment hierarchy.
ContentDiscoveryReset Resets the list of feeds, search providers, and Web Slices associated with the page.
CustomizeClearType Not supported. Sets a registry value to turn ClearType on or off.
CustomizeSettings Not supported. Saves the user settings from a “first run” page.
DefaultSearchProvider Not supported. Retrieves the name of the user’s default search provider.
DiagnoseConnection Not supported. Attempts to diagnose problems with the network connection.
ImportExportFavorites Deprecated. Handles the import and export of Internet Explorer favorites.
InPrivateFilteringEnabled Detects whether the user has enabled InPrivate Filtering.
IsSearchMigrated Not supported. Determines whether autosearch settings were migrated from a previous version of Internet Explorer.
IsSearchProviderInstalled Determines if a search provider has been installed for the current user and whether it is set as default.
IsServiceInstalled Check if a service is already installed.
IsSubscribed Obsolete. Retrieves a value indicating whether the client subscribes to the given channel.
NavigateAndFind Navigates to the specified URL and selects the specified text.
PhishingEnabled Not supported. Determines whether Microsoft Phishing Filter is enabled.
raiseEvent Triggers an event, as specified.
RunOnceHasShown Not supported. Determines whether the “first run” page has been shown.
RunOnceRequiredSettingsComplete Not supported. Sets a registry value to indicate whether the “first run” page completed successfully.
RunOnceShown Not supported. Sets a registry value to indicate that the “first run” page has been shown.
SearchGuideUrl Not supported. Retrieves the URL of a page that can be used to install additional search providers.
setContextMenu Constructs a context menu, as specified.
ShowBrowserUI Opens the specified browser dialog box.
SkipRunOnce Not supported. Enables the user to select “first run” settings at a later time.
SkipTabsWelcome Not supported. Disables the welcome screen that appears when opening a new tab in Internet Explorer 7.
SqmEnabled Not supported. Determines whether Software Quality Monitoring (SQM) is enabled.

Similar Posts: