Add to Favorites link

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>
  • Share/Bookmark

Leave a comment

Your comment