# Adding to favorites

**URL:** <https://forum.kirupa.com/t/adding-to-favorites/65912>\
**Category:** Uncategorized\
**Created:** [September 30, 2004, 3:28pm UTC](https://forum.kirupa.com/t/adding-to-favorites/65912 "2004-09-30T15:28:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![holePUNCH\_Ryan](https://avatars.discourse-cdn.com/v4/letter/h/e9bcb4/32.png) [@holePUNCH\_Ryan](https://forum.kirupa.com/u/holePUNCH_Ryan)\
**Post date:** [September 30, 2004, 3:28pm UTC](https://forum.kirupa.com/t/adding-to-favorites/65912/1 "2004-09-30T15:28:56Z")

</div>

can someone give me html code to add to a button that adds the page to favorites. I have tried and tried with script but nothing. I dont want a return message or a form button i want to add my own img src button to it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 4:59pm UTC](https://forum.kirupa.com/t/adding-to-favorites/65912/2 "2004-09-30T16:59:09Z")

</div>

never tried it but apparently this works

a href=“JavaScript:addbookmark()”

and then in the javascript function

function addbookmark()  
{var bookmarkurl,bookmarktitle;

bookmarkurl = “[http://www.kirupa.com](http://www.kirupa.com)”;  
bookmarktitle = “Kirupa web site”;

if (document.all){ window.external.AddFavorite(bookmarkurl, bookmarktitle); }  
}

also if you’re intrested how some sites are able to add the little icon in the favourites list, go here: [http://www.w3schools.com/about/about\_faq.asp](http://www.w3schools.com/about/about_faq.asp) and scroll down to the section entitled **How did we add a Favicon to our Web Site?**

hope this helps :thumb:
