View Single Post
Old 02-27-2007, 01:42 AM   · #1
blackwizard
Account Suspended
 
Location: India
Trader Rating: (8)
Join Date: Oct 2005
Posts: 636
NP$: 15.35 (Donate)
blackwizard is a jewel in the roughblackwizard is a jewel in the roughblackwizard is a jewel in the rough
Cool Bookmark Site script

Step 1: Add the below code to the <head> section of your page:

Quote:
<script type="text/javascript">

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}
</script>



Step 2: Create either an image or text link that will be used as the Bookmark Site link. For the href attribute, use the following code:

Quote:
javascript:bookmarksite('title_of_site', 'url_of_site')



Here's an example:
Quote:
<a href="javascript:bookmarksite('FlickArcade', 'http://www.flickarcade.com')">Bookmark this site!</a>



Remember, if your site's title contains apostrophes, they need to be backslashed when entered:

Quote:
<a href="javascript:bookmarksite('Mike\'s Place', 'http://www.google.com')">Bookmark this site!</a>



Source: www.dynamicdrive.com
If you Like this Script, Rep. is always Appreciated, For sharing this Script.


Please register or log-in into NamePros to hide ads
blackwizard is offline   Reply With Quote
Site Sponsors
Special Offer Find out how!
Advertise your business at NamePros
All times are GMT -7. The time now is 11:39 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.