Congratulations to all the winners of April 2013, they have won INR 3400 cash and INR 20147 worth prizes !
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 2954 |  Welcome, Guest!   Register  Login
 Home > Code Snippets > JavaScript > Add functionality of Bookmark in your site. ...
Neeks

Add functionality of Bookmark in your site.

 Code Snippet posted by: Neeks | Posted on: 2/26/2009 | Category: JavaScript Codes | Views: 1081 | Status: [Member] | Alert Moderator   


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:


>> Write Response - Respond to this post and get points

More codes snippets

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/19/2013 12:51:32 PM