We can add a link in the web pages which allows users to add the web page in the Favorites/Bookmarks list of IE/Netscape/Opera web browsers.
To achieve this we need to write a JavaScript function, say "AddToFavorites", and add a hyperlink. On click of the hyperlink, just call the JavaScript function "AddToFavorites".
Use following code snippet to add hyperlink in your web page:
<a href="#" onmousedown="AddToFavorites('eTechPlanet.com','http://www.etechplanet.com')" >Add to Favorites</a>
and the JavaScript function "AddToFavorites" can be defined as below:
function AddToFavorites(siteTitle, siteURL)
{
if (window.sidebar)
{
window.sidebar.addPanel(siteTitle, siteURL,"");
}
else if(document.all)
{
window.external.AddFavorite(siteURL, siteTitle);
}
else if(window.opera && window.print)
{
return true;
}
}