Add to favorites button (Rated 0)Description:
This will display a button on your site, which when pressed will add your site to the favorites menu.
This is useful as it might remind some browsers of the ability to bookmark a site for later. Code starts here
<script language="JavaScript">
<!--
function DOC_addToFavorites() {
if (window.external) {
external.AddFavorite("http://www.devscripts.net", "Devscripts.net - Scripts for developers");
}
else {
alert("Your browser doesn't support this feature.");
}
}
// -->
</script>
<script language="JavaScript">
<!--
if ((navigator.platform.indexOf('Win') > -1) && (navigator.appName == "Microsoft Internet Explorer")) {
var writeFavorite = '<table width=90% cellpadding=10>'
+ ' <tr>'
+ ' <td align="right"><input onClick="DOC_addToFavorites();" type="button" value="Add to favorites"></td>'
+ ' <tr>'
+ '</table>';
document.write(writeFavorite);
}
else {
var writeFavorite = '<table width=90% border=1>'
+ ' <tr>'
+ ' <td align="right">Your browser does not support this feature. This only works on windows Internet Explorer.</td>'
+ ' <tr>'
+ '</table>';
document.write(writeFavorite);
}
// -->
</script>
Submitted by Devscripts on 25-02-2003 0:09 |