Click to See Complete Forum and Search --> : Add to Favourites link


thecourtenayboy
09-01-2004, 11:02 AM
Hi all, I want to add a link to my site so that when clicked on it will add the site address to my favourites. I have found various html code and script to do this, but what I cant find/workout, is how to add the same link to a picture on the site, so that when clicked on, it adds the address to your browsers favourites.

Hopefully someone can help. Here is the code I was hoping to edit. And the picture I wanted to link it to is 'newraidfont.jpg'


<script language="javascript" type="text/javascript">
<!-- Hiding from other browsers
var name = navigator.appName;
if (name == "Microsoft Internet Explorer")
{
document.write("<a href=\"http://www.theraid.co.uk\" onclick='window.external.AddFavorite(\"http://www.theraid.co.uk\",\"The Raid's official website\");return false'>Add to Favorites </a>")
document.write("<br /><br />")
}
// -->
</script>


Thanks in Advance = )

Eupseudes
09-01-2004, 02:52 PM
Simple. You see where it says "Add to Favorites"? We just replace that with your image pic.


<script language="javascript" type="text/javascript">
<!-- Hiding from other browsers
var name = navigator.appName;
if (name == "Microsoft Internet Explorer")
{
document.write("<a href=\"http://www.theraid.co.uk\" onclick='window.external.AddFavorite(\"http://www.theraid.co.uk\",\"The Raid's official website\");return false'><img src='newraidfront.jpg' /></a>")
document.write("<br /><br />")
}
// -->
</script>


That should do it.