
Originally Posted by
pistolpapa
Here is what I wanted to achieve, exactly like google did.
1. When visitors come to the website, they see a "set it to my homepage" link
2. After user clicks on that link and confirms, the link will disappear. However, if next time when you visit the site, the homepage is altered, then the link will appear again.
There must be some kind of condition checking in the code. I tried to understand this not-so-complicated page, even set up a redirect page mgyhp.html to direct to index.html, however, no luck in successing. The link appears all the time in explorer even after setting the homepage.
<span id=hp style="behavior:url(#default#homepage)"></span>
<script>
//<!--
if (!hp.isHomePage('http://www.google.com/')) {document.write("<p><a href=\"/mgyhp.html\" onClick=\"style.behavior='url(#default#homepage)';setHomePage('http://www.google.com/');\">Make Google Your Homepage!</a>");}
//-->
</script>
Bookmarks