SQL PHP HTML ASP JavaScript articles and free scripts to download

Javascript Add to favorite or book mark the link or url of the page

We store URL of sites by using my favorite or book mark feature. The URL of the site will be added to our favorite or bookmark links. We will use JavaScript function to do this. On clicking the link browser will open the window for conformation and adding the link to the list. Here is the function and below that the link to add the this site to your favorite list.

Replace your site url and title while using this code.

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function bookmark()
{
bookmarkurl="http://www.example.com";// replace your site URL
bookmarktitle="example.com: PHP SQL and Javascript Source"; // replace this line with your site title
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
else if (window.sidebar) // firefox
window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
}
// End -->
</script>

The above function should go the head section of the page and the link can be placed inside the body section of the page. Here is the code to place the link asking the visitors to click the link and add to their favorite.

<div align="center"> <a href="javascript:bookmark()">Bookmark This Page</a> </div>

Demo of Add to Favorite


Google+

Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked




Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer