A simple 'Bookmark Us' Java script. The purpose of making a 'Bookmark Us' Script is that, most of these days, people are too lazy to even press Ctrl + D. So if they find just a clickable link to do this, then it'll be used most.
So this is just a simple script. Put it between your <body></body> Tags (anywhere inside the Body)
Next, place the following code in order to show the link that opens browser's bookmark window:
That is all! You have now a full working bookmark us script.
Note: If your title contains quotes, you should escape them with backslash (\):
Credit goes to BlaZe
So this is just a simple script. Put it between your <body></body> Tags (anywhere inside the Body)
PHP:
<script type="text/javascript">
function bookmark_us(url, title){
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>
Next, place the following code in order to show the link that opens browser's bookmark window:
PHP:
<a href="javascript:bookmark_us('http://www.tutsby.me','Tutorials By Me - Server, Coding, Hacking, Graphics,')">Bookmark us!</a>
That is all! You have now a full working bookmark us script.
Note: If your title contains quotes, you should escape them with backslash (\):
PHP:
<a href="javascript:bookmark_us('http://www.tutsby.me','Tutorial\'s By Me - Server, Coding, Hacking, Graphics')">Bookmark us!</a>
Credit goes to BlaZe