Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

JavaScript Bookmarks: Add Favorite, Bookmark Now, Add to Bookmarks

Ads
banner
banner
banner
invisibe_dude Offline referral

Posts: 820
Joined: May 2013
Reputation: 24

#1
Posting Freak
Here I have decided to help you with how to add a bookmark by JavaScript. This JavaScript Bookmarks code works on, Opera, Firefox and Internet Explorer. It doesn't work on Chrome

Add this JavaScript code just above </head>
Code:
<script type="text/javascript" language="JavaScript">
function Bookmark() {
    url = "http://letsforum.com";
    title = "Lets Forum - Community Discussion Forum Boards";
    if(document.all){window.external.AddFavorite(url,title);}
    else if(window.sidebar){window.sidebar.addPanel(title,url, "");}
    else if(window.opera && window.print) {    return false; }
}
function focus(){ document.myform.domainname.focus(); }
function Alert(){
    alert('Your browser does not support this fuction!. Please add this bookmark manualy through bookmark menu or by pressing Ctrl+D.');
}
</script>

Add this JavaScript code inside the HTML body
Code:
<script type="text/javascript" language="JavaScript">
                    var bmt = "";
                    if(window.opera && window.print) {
                        document.write('<a rel="sidebar" href="http://letsforum.com" title="Lets Forum - Community Discussion Forum Boards"><strong>Bookmark Now</strong></a>');
                    }
                    else {            
                        if(document.all){
                            document.write('<a rel="nofollow" href="#" onclick="javascript:Bookmark();return false;" title="Add to Favorites"><strong>Add to Favorites</strong></a>');
                        }
                        else if(window.sidebar){
                            document.write('<a rel="nofollow" href="#" onclick="javascript:Bookmark();return false;" title="Add to Bookmarks"><strong>Add to Bookmarks</strong></a>');
                        }
                        else{
                            document.write('<a rel="nofollow" href="#" onclick="javascript:Alert();return false;" title="Bookmark Now"><strong>Bookmark Now</strong></a>');
                        }
                    }
                    </script>

Here is an example:
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HTML Title</title>
<script type="text/javascript" language="JavaScript">
function Bookmark() {
    url = "http://letsforum.com";
    title = "Lets Forum - Community Discussion Forum Boards";
    if(document.all){window.external.AddFavorite(url,title);}
    else if(window.sidebar){window.sidebar.addPanel(title,url, "");}
    else if(window.opera && window.print) {    return false; }
}
function focus(){ document.myform.domainname.focus(); }
function Alert(){
    alert('Your browser does not support this fuction!. Please add this bookmark manualy through bookmark menu or by pressing Ctrl+D.');
}
</script>
</head>

<body>
<script type="text/javascript" language="JavaScript">
                    var bmt = "";
                    if(window.opera && window.print) {
                        document.write('<a rel="sidebar" href="http://letsforum.com" title="Lets Forum - Community Discussion Forum Boards"><strong>Bookmark Now</strong></a>');
                    }
                    else {            
                        if(document.all){
                            document.write('<a rel="nofollow" href="#" onclick="javascript:Bookmark();return false;" title="Add to Favorites"><strong>Add to Favorites</strong></a>');
                        }
                        else if(window.sidebar){
                            document.write('<a rel="nofollow" href="#" onclick="javascript:Bookmark();return false;" title="Add to Bookmarks"><strong>Add to Bookmarks</strong></a>');
                        }
                        else{
                            document.write('<a rel="nofollow" href="#" onclick="javascript:Alert();return false;" title="Bookmark Now"><strong>Bookmark Now</strong></a>');
                        }
                    }
                    </script>
</body>
</html>

Remember to replace: Lets Forum - Community Discussion Forum Boards and http://letsforum.com with your own title and url
conocer gente gratis, chatear y buscar amigos en chat gratis o ligar. Citas, contactos y encuentros.
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#2
Support Team
The Google Chrome browser won't let you add bookmarks via Javascript. This makes Chrome more secure
Looking for ways to make money fast? Read this article and start earning money todya fast, easy or for free.
invisibe_dude Offline referral

Posts: 820
Joined: May 2013
Reputation: 24

#3
Posting Freak
Unfortunately the Chrome browser does not actually let you add bookmarks via Javascript.
conocer gente gratis, chatear y buscar amigos en chat gratis o ligar. Citas, contactos y encuentros.
victor Offline referral

Posts: 638
Joined: Jun 2013
Reputation: 33

#4
Senior Member
I hate Chrome browser yeah it's fast but there are functions that just make no sense. Firefox it the best browser has plenty of good ad-dons, it's fast and cool!
Thanks for sharing Dude!





User(s) browsing this thread: 1 Guest(s)