Search
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Codes Author
Sat, 30-Aug-2014 Authors
All Time Authors
Satyapriyanayak
12160
Jayakumars
8120
Niladri.biswas
6000

Latest members | More ...


(Statistics delayed by 5 minutes)
 Codes

Add functionality of Bookmark in your site.

Neeks
Posted by Neeks under JavaScript on 2/26/2009 11:27:56 PM | Views : 1651 | Status : [Member]

JavaScript which will help to add the link in the Bookmark

<script language="javascript" type="text/javascript">

//Function to add the Link and the Title of the Link in the Bookmark List
function fnfav(url,title)
{
//url --> Site URL you want to add in the Bookmark List
//title --> Title you want to display with the Bookmark
switch(navigator.appName)
{
case "Microsoft Internet Explorer":
if((parseInt(navigator.appVersion) >= 4))
window.external.AddFavorite(url,title);
break;
case "Netscape":
window.sidebar.addPanel(title,url,"");
break;
default:
{
alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
}
}
}
</script>

For your ASPX page
<form id="form1" runat="server">

<div>
<b>Add functionality of Bookmark in your site.</b>
This example shows how we can add the functionality for adding the site in the Bookmark list.
<hr />
<a href="#" onclick="fnfav('http://www.google.com', 'Google');">Add to favourate</a>
</div>
</form>


Found interesting? Add this to:



Comments or Responses


Login to post response