How to add a bookmark code in your high traffic website

Here’s how to add a bookmark code in your high traffic website:

1. Place the following script into your section in the page you need to use it:

<script type="text/javascript">

function bookmark_us(url, title){

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>


2. Next, place the following code in order to show the link that opens browser’s bookmark window:

<a href="javascript:bookmark_us(’http://www.virtuosomaster.com’,'Developers Help For Dummies’)">Bookmark us!</a>

Note: If your title contains quotes, you should escape them with backslash:

<a href="javascript:bookmark_us(’http://www.virtuosomaster.com’,'Developer\’s Help For Dummies’)">Bookmark us!</a>

Good luck!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Furl
  • Reddit
  • Smarking
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb
  • Simpy
  • Propeller
  • Fark
  • LinkedIn
  • Live
  • Mixx

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment