Click to See Complete Forum and Search --> : set home page js code needed


thisObject
02-11-2006, 11:19 PM
Can somebody please post the code to set up a current page as a home page?

Would be nice if the code is compatible with all major browsers.

Thanks

Jona
02-11-2006, 11:48 PM
It would be, except the only browser that lets you do something like that is Internet Explorer, which is incidentally the most vulnerable browser to viruses and other malicious attacks, presumably due to “features” such as these.

The code you can use follows.


<a href="#" onclick="this.style.behavior = 'url(#default#homepage)'; this.setHomePage('http://site.com');">Set as Homepage</a>


For Mozilla browsers (Netscape, Mozilla, Firefox, and I think Camino), you can instruct users to hit “Ctrl+D.”