NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Bookmark Site script

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
8 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 02-27-2007, 01:42 AM THREAD STARTER               #1 (permalink)
Account Closed
Join Date: Oct 2005
Location: India
Posts: 633
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
????: NamePros.com http://www.namepros.com/code/299149-bookmark-site-script.html
If you Like this Script, Rep. is always Appreciated, For sharing this Script.
blackwizard is offline  
Old 08-17-2007, 10:09 PM   #2 (permalink)
NamePros Member
Join Date: Aug 2004
Posts: 37
recoil is an unknown quantity at this point
 



It works well.
Thanks for sharing.
recoil is offline  
Old 08-18-2007, 02:08 AM   #3 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund
Thats a LOT of Javascript in the head tag that really is not needed. This should work just as well, tested in IE6+7, Opera, FF and worked fine.

http://neville.tk/bookmarkcreation.php

Example:
Code:
<a href="http://namepros.com" rel=sidebar name="Favourite us" title="NamePros Homepage" onClick="javascript:window.external.AddFavorite('http://namepros.com','NamePros Homepage');return false">Bookmark us!</a>
Last edited by Danltn; 08-18-2007 at 02:11 AM.
Daniel is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 03:33 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger