Faraz Shah Khan

MCP, MCAD.Net, MCSD.Net, MCTS-Win, MCTS-Web, MCPD-Web

Javascript to add bookmark option on your website

If you want to add an option that users can click a button on your website and it will open up bookmark option. Following is the code that will perform this task.

<html>
<body>
<SCRIPT LANGUAGE="JavaScript">
function bookmark(url, description)
{
if (navigator.appName=='Microsoft Internet Explorer')
{
window.external.AddFavorite(url, description);
}
else
{
alert('This option works with IE only as of now.');
}
}

</SCRIPT>
<input type="Button" ID="btnBookMark" onClick="bookmark('http://mypage.aspx','MyWebsite')" value="Bookmark" />
</body>
</html>

Comments

Scott said:

Works great!

# December 22, 2008 3:03 PM

parth said:

really good,thanks

# September 22, 2009 6:15 AM

Syed Khurram Ali said:

i want mail option on my website???

# August 11, 2010 5:42 AM

zahid said:

visit and learn photoshop online http://www.sial.mezoka.com

# October 2, 2010 12:43 PM

Meatheangeree said:

markedly  <a href="http://kaiser-permanente-p.groupsite.com">kaiser permanente news</a> bonsal  

# November 23, 2010 6:35 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)