Lost Password? Register
  • Narrow screen resolution
  • Wide screen resolution
  • Auto width resolution
  • Increase font size
  • Decrease font size
  • Default font size
  • default color
  • red color
  • green color
Member Area

Web Code

Home arrow Scripts arrow JavaScript arrow Add to favorites script, Bookmark script
Add to favorites script, Bookmark script PDF Print E-mail
Written by Administrator   
Thursday, 18 October 2007

If you want to add a little star on your page that when click upon the user will save your site to his favorites, add this to your page, below the <head>:

 

<script
language="JavaScript">
function addbookmark()
{
bookmarkurl="http://www.yoursite.com/"
bookmarktitle="your site"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
</script>

 

Then put this part where you want to see the actual button (you can also use text link if you want):

<a
href="javascript:addbookmark()"><img
src="http://www.webmasterspy.com/images/favorites1.gif" alt="Add to
Favorites" name="Image40" border="0" height="28"
width="33"></a>

Now you can see a little bookmark star on your page. When you click on it you'll be asked to save the page to your favorites.


Related Items:





Reddit!Del.icio.us!Facebook!Slashdot!Technorati!StumbleUpon!Furl!Yahoo!Ma.gnolia!Free social bookmarking plugins and extensions for Joomla! websites!

Add as favourites (93) | Quote this article on your site | Views: 1571

Comments (1)
1. 31-01-2008 04:45
nice script
helps a lot
Written by oren (Guest)

Write Comment
Name:
Title:
Comment:

Code:* Code

Last Updated ( Thursday, 18 October 2007 )
 
< Prev