Adding Bookmark This link to your website using javascript

We could easily add a bookmark this site link or add to your favorite sites link using javascript by adding the following code to your website:

<script language="javascript">
function addBookmark()
{
bookmarkurl = "http://www.tildemark.com";
bookmarktitle="Tildemark blogs";
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
else if ( window.sidebar ) {
window.sidebar.addPanel(bookmarktitle, bookmarkurl,"");
}
</script>

You can then place your bookmark link by adding an onClick function on your anchor tag like this:

<a href="javascript:addBookmark();">Bookmark this page!</a>

Here's a sample code:
Bookmark this page!

Please note that this code is browser dependent.

0 TrackBacks

Listed below are links to blogs that reference this entry: Adding Bookmark This link to your website using javascript.

TrackBack URL for this entry: http://www.tildemark.com/cgi-bin/mt4/mt-tb.cgi/58

Leave a comment

About this Entry

This page contains a single entry by tildemark published on February 12, 2007 6:28 AM.

Enable curl with XAMPP on Windows XP was the previous entry in this blog.

X-Men Legends 2: Rise of Apocalypse is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.