Click to return to the DHTML, HTML     
AddDesktopComponent Metho...     addImport Method     DHTML Methods    
Web Workshop  |  DHTML, HTML & CSS

AddFavorite Method


Prompts the user with a dialog box to add the specified URL to the Favorites list.

Syntax

external.AddFavorite(sURL [, sTitle])

Parameters

sURL Required. String that specifies the URL of the favorite to be added to the Favorites list.
sTitle Optional. String that specifies the suggested title to be used in the Favorites list. The user can change the title in the Add Favorite dialog box.

Return Value

No return value.

Remarks

Calling the AddFavorite method in script yields the same dialog box that is presented when the user selects Add to Favorites from the Favorites menu.

This method is not supported in HTML Applications.

Example

This example uses the AddFavorite method to prompt a user to add the current page to the Favorites list.

Sample Code

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

This feature requires Internet Explorer 4.0 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
external


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.