Is there a simple way to create a link that does either?
Basically, I would like a very simple way to do this. Any suggestions are helpful.
In just IE:
<a href="javascript:window.external.AddFavorite('http://mysite.com', 'My Site')">Bookmark This Site</a>
In firefox and IE:
function addBookmark(title, url) {
if (window.sidebar) { // firefox
window.sidebar.addPanel(title, url,"");
} else if( document.all ) { //MSIE
window.external.AddFavorite( url, title);
} else {
alert("Sorry, your browser doesn't support this");
}
}
<a href="javascript:addBookmark('My Site','http://www.mysite.com')>Add bookmark</a>