4 March 2005
Add to Favorites link
Posted by Mikhail Esteves under: Tips .
So how do you make a browser compatible “Add to Favorites” link? First, create a Javascript function:
function addfav(){
if(window.external)
{
window.external.AddFavorite(
"http://www.thejackol.com", "the jackol's den");
return false;
}
return true;
}
And you call it like this:
<a href="#" rel="sidebar"
onclick="return addfav();">Add to favourites</a>