Hey guys, Does anybody have a relativly small javasript code that bookmakrs a site when you click it. Id prefer it to work on multiple browsers. Thanks in advance
<a href="javascript:window.external.AddFavorite('http://website.com/','Website Tital')">Add To Favorites</a> Code (markup): Hope it helps...
Ah Yes I was testing in FF, my bads, Do you have a script that works for FF too? Or could you possible modify this one? I know 0 about Javacript, Rep Added also Thanks
The real script that bookmark into opera,ff and ie Put in header this: <script type="text/javascript"> <!-- /* Bookmark 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> Code (markup): Call like this <a onclick="javascript:bookmarksite('bookmarktitle', 'http://www.yoursite.com');" href="javascript:void(0);"> Code (markup): JAP
Also be aware that autobookmarking scripts are no use in increasing bookmarkers this is because they always show the 'where do you want your bookmark put' dialog. Plus many pop-up blockers will stop them working as well. Far better just to write 'Press Ctrl-D NOW to bookmark this site!' which works on everything whether jscript enabled, pop-up blocked or not.