Please visit our sponsor
UNKNOWN '************************************** ' Name: Add to Favorites - Dynamically! ' Description:After searching throughout ' the web for a JavaScript function that w ' ould add a web page to a users favorites ' folder, I grew increasingly impatient wi ' th the laziness of others code, (hey why ' re-create the wheel?) because others cod ' e only lets you add one page to a users ' favorites folder. Therefore, I created a ' DYNAMIC &#8220;Add to Favorites&#8221; f ' unction, that for example will add the w ' eb page where the code is located to the ' users favorites. Just create an include ' virtual, (for script) and insert the inc ' lude onto all of your pages, or preferab ' ly if you have a header page include, ju ' st copy the code into that - and V ' oila! As long as you have the TITLE tags ' on your page, you’re set! ' By: Matthew Khoury ' ' ' Inputs:None, the code is very generic, ' so just copy the code as is. ' ' Returns:None, the code is very generic ' , so just copy the code as is. ' 'Assumes:You MUST have TITLE tags on you ' r web pages! Also, make sure the TITLE t ' ags are ABOVE your start JavaScript tag. ' ' 'Side Effects:None. 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.6463/lngWId.4/qx/ ' vb/scripts/ShowCode.htm 'for details. '************************************** <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>ADD To Favs</title> <script language="JavaScript1.2"> var bookmarkurl = window.location.href; var bookmarktitle = document.title; function addfav(){ if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle); } </script> </head> <body> <a href="javascript:addfav()">Add page To favorites</a> </body> </html>