My shared items

 

Thursday, August 30, 2007

"Add To Favorites" Dialog in JavaScript

JavaScript to launch the browser Favorites window to bookmark the current page.

function bookmarkThisSite(url, bookmarkName)
{
if (sidebar)
{
sidebar.addPanel(bookmarkName, url,"");
}
else if( document.all )
{
external.AddFavorite(url, bookmarkName);
}
else if( window.opera && window.print )
{
return true;
}
else
{
return true;
}
}

No comments: