Thursday 26 August 2010

Cross browser Bookmark that works on Firefox, Internet Explorer, Opera and Netscape

This Cross browser script can be used on any site to provide user an easy way to bookmark/add to favourite your site. Many may ask why do we need this as the user can do it directly through their browser. The answer is simple the user may not always think to add a site to favourites, but when they see this link they may add your site as a book mark. So this is just an easy way to remind the user and many new users or those who are not used to computers will find this easy.

You can also place this on your blog. Just copy and past the script and you are ready. Please do not forget to change the anchor tag below to use your site.

<script type="text/javascript">
/* Modified To support Opera */
Function bookmark(title,url){
If (window.sidebar) // firefox
    window.sidebar.addPanel(title, url, "");
Else If(window.opera && window.print){ // opera
    var elem = document.createElement('a');
    elem.setAttribute('href',url);
    elem.setAttribute('title',title);
    elem.setAttribute('rel','sidebar');
    elem.click();
}
Else If(document.all)// ie
    window.external.AddFavorite(url, title);
}
</script>

<a class="art" href="javascript:bookmark('Bookmark Easy Widget', 'http://itgalarysongs.blogspot.com/')"><b>Bookmark this Site</b></a>

No comments:

Post a Comment