Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Add to Favourites" and "Set as Homepage"
#1
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
Condoms aren't completely safe. A friend of mine was wearing one and got hit by a bus.
Reply
#2
There are a lot of people that may not know that, good share man.
Do you know how to make games? Do you know 3d Modeling? If so then visit
[Image: logo.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  wish to add to newthread Kathryn 1 931 12-27-2016, 06:16 AM
Last Post: Hosting.
  Add Members page to new theme? RedKarma 4 788 02-04-2012, 02:40 PM
Last Post: Denny Crane
  [Help] How to add Snow Fall Plugin? Jinu 3 1,444 11-28-2011, 07:43 AM
Last Post: Jinu
  [TUT]Set up your own online RADIO STATION alabama 1 1,229 08-01-2011, 03:14 PM
Last Post: Jacko
  Need Add-on for Forum PCjoy 5 1,542 02-19-2011, 12:10 PM
Last Post: Eve

Forum Jump:


Users browsing this thread: 1 Guest(s)