Jump to content


Photo

How to let user set my website as their home page?


  • Please log in to reply
1 reply to this topic

#1 fert

fert
  • Members
  • PipPipPip
  • Advanced Member
  • 1,114 posts

Posted 19 July 2006 - 02:05 AM

How do i let people set my website as their home page in javascript?

Si hoc legere scis nimium eruditionis habes
Gentoo Linux 2007.0 Firefox 2

#2 GBS

GBS
  • Members
  • PipPipPip
  • Advanced Member
  • 108 posts

Posted 26 July 2006 - 12:11 PM

Hi,

in IE you could try some script like:
<html>
<body>

<script language="JavaScript">
var bookmarkurl="http://www.testing_bookmarks.com/";var bookmarktitle="testing";
function addbookmark(){
if (document.all);window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

document.write('<a href="javascript:addbookmark()">Add testing to your favorites</a>, or<br>')
</script>
<a class="chlnk" style="text-decoration:underline;cursor:pointer;color:#0000FF;" HREF onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.testing_bookmarks.com/');">set your homepage to testing.</a>

</body>
</html>
But this doesn't work with firefox,,

With ff, maybe check the link:
http://support.milon...debar/index.htm
& then, the idea could be to detect the browser, & use the correct functions depending of the browser client,

Hoping it helps,,

l8tr,
Sorry for my english,... I do my best, but sometimes,...
1st intention: understand the problem
2nd intention: try to solve it
3rd intention: try to understand how to solve it :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users