Javascript Bookmark This Page
February 6th, 2008 | posted by Anonymous
in
This javascript will add your page to client bookmark list. Work on Internet explorer and Mozilla Firefox.
1. Type this code inside head tags
<script language="javascript"> function addBookmark(title,url) { var msg_netscape = "NetScape message"; var msg_opera = "This function does not work with this version of Opera. Please bookmark us manually."; var msg_other = "Your browser does not support automatic bookmarks. Please bookmark us manually."; var agt = navigator.userAgent.toLowerCase(); if (agt.indexOf("opera") != -1) { if (window.opera && window.print) { return true; } else { alert(msg_other); } } else if (agt.indexOf("firefox") != -1) { window.sidebar.addPanel(title,url,""); } else if ((agt.indexOf("msie") != -1) && (parseInt(navigator.appVersion) >=4)) { window.external.AddFavorite(url,title); } else if (agt.indexOf("netscape") != -1) { window.sidebar.addPanel(title,url,"") } else if (window.sidebar && window.sidebar.addPanel) { window.sidebar.addPanel(title,url,""); } else alert(msg_other); } </script>
2. Create bookmark link
<a href="javascript:addBookmark('Article and Tutorial for newbie',
'http://www.fornewbie.com');">Bookmark Us</a>
Sample :
Bookmark Us











Post new comment