Support Forums

Full Version: "Add to Favourites" and "Set as Homepage"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:
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>

Blackhat
There are a lot of people that may not know that, good share man.