12-19-2009, 07:44 AM
I sure that you have seen on a lot sites link "Add site to Favourites" and "Set this page as homepage", now I write simple tutorial how to put those link and on your site.
1. "Add to Favourites"
Code below add between <head> </head> tags on your site:
And this one on location where you want to be shown your link:
2. "Set as Homepage"
And on location where you want to be "Set as Homepage" link, add this code:
1. "Add to Favourites"
Code below add between <head> </head> tags on your site:
Code:
<script type="text/javascript">
function ie-ns-ff-bookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
And this one on location where you want to be shown your link:
Code:
<a href="javascript:ie-ns-ff-bookmark('Support Forums', 'http://www.supportforums.net')">Add to Favourites!</a>
2. "Set as Homepage"
Code:
<script language="JavaScript">
function setHome()
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage(window.location.href);
}
</script>
And on location where you want to be "Set as Homepage" link, add this code:
Code:
<a href="javascript:setHome()">
Set as Homepage!</a>
Condoms aren't completely safe. A friend of mine was wearing one and got hit by a bus.