Set Home Page Link

Any problem with javascript can be discussed here.
Post Reply
coco
Posts: 50
Joined: Thu Dec 23, 2004 12:01 pm
Contact:

Set Home Page Link

Post by coco »

Allow the visitor to set your site as their home page with a link. This works best in Internet Explorer, but also displays the appropriate information based on browser type.

<!-- ONE STEP TO INSTALL SET HOMEPAGE LINK:

1. Copy the coding into the BODY of your HTML **** -->



<body>

<script type="text/javascript" language="JavaScript">
<!-- Begin
// If it's Internet Explorer, use automatic link
if (****.all){
****.write('<A HREF="javascript:history.go(0);" ****="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.8sky.info\');">');
****.write('<font size="5" color=6699FF face=arial>**** Here to Make My Web Page Your Homepage</font></a>');
}

// If it's Netscape 6, tell user to drag link onto Home button
// Be sure to change the "http://www.mysite.com\"
// to the URL you want them to bookmark.
else if (****.getElementById){
****.write('Drag this link onto your Home button to make this your Home Page.');
}

// If it's Netscape 4 or lower, give instructions to set Home Page
else if (****.layers){
****.write('Make this site your home page:
- Go to Preferences in the Edit Menu.
- Choose Navigator from the list on the left.
- **** on the "Use Current Page" button.');
}

// If it's any other browser, for which I don't know the specifications of home paging, display instructions
else {
****.write('Make this site your home page:
- Go to Preferences in the Edit Menu.
- Choose Navigator from the list on the left.
- **** on the "Use Current Page" button.');
}
// End -->
</script>

</body>


Post Reply