Free web development scripts for the webmasterDevelopment Scripts

 Site Navigation
 o Development Scripts
 o Text Only Edition
 o PHP.net News
 o Tutorials
 o Register an account
 o New entries this week
 o Affiliates/Links
 o Contact Us
 o About us
 o Advanced Search

 Browse Path
 o 7 users online
 o Most users online: 67
 o Home
  o Javascripts
   o Forms Manipulation
    o Script

 Member Login
User Name
Password

 Standards
Valid XHTML 1.0!
Valid 
CSS!

 Recommended Links
 o PHP Freaks
 o Designer Baby Clothes
 o Advertise Here Make Money
 o Open Source Design
 o Free Wedding Websites
 o Wedding Vendor Directory
 o designplace
 o devnet
 o OxyScripts

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


Rate This Script

User Contributed Comments

Registered Members login
© Copyright 2003 - Devscripts.net