Add the Current Page to Favorites

The following code is used to add a link that, when clicked, adds the current page to the user's Favorites folder. There are two versions, one to use if you serve the same page to all users, regardless of browser version, and one if you are sure the user has Internet Explorer 4.0 or higher.

For all browsers

This script does its own client-side browser detection.

<SCRIPT>
<!--
if ((navigator.appVersion.indexOf("MSIE") > 0) 
  && (parseInt(navigator.appVersion) >= 4)) {
    document.write("<U>
      <SPAN STYLE='color:blue;cursor:hand;' 
      onclick='window.external.
AddFavorite(location.href, document.title);'>
Add this page to your favorites</SPAN>
  </U>");
}
//-->
</SCRIPT>

For Internet Explorer 4.0 and higher only

This script assumes you perform browser detection on the server or have a homogenous Internet Explorer 4. x or better environment.

<U><SPAN STYLE='color:blue;cursor:hand;' 
 onclick='window.external.
AddFavorite(location.href, document.title);'>
Add this page to your favorites</SPAN></U>

My3C's
perrychicker
It's easy... it's a PSACAKE!
Back | Tell A Friend | Search this Site
© 1998 - 2010 psacake.com
Version 3.23

Send me One Million FREE Guaranteed Visitors