BOOK MARK THIS SITE -how to ad the button

Discussion in 'HTML & Website Design' started by Aaron111, Oct 17, 2009.

  1. #1
    Hey all - im looking for the code to how to add the book mark me button on my website ... what should I google??/ :eek:
     
    Aaron111, Oct 17, 2009 IP
  2. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #2
    If you're using WordPress, just take a look at this nice plugin: http://wordpress.org/extend/plugins/sociable/
    If you're not using WP, you may also check out its source code to refine the bookmarking sites URLs.

    Good luck.
     
    myst_dg, Oct 17, 2009 IP
  3. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #3
    thanks but that is not what im looking for ... all I want is the book marklet link thats adds the website into the browser ..... thanks though :eek:
     
    Aaron111, Oct 18, 2009 IP
  4. 84productions

    84productions Peon

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Place the following script into your <head>section in the page you need to use it:

    <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:

    <a href="javascript:bookmark_us('http://www.reconn.us','Reconn.us - Free PHP, Javascript Resources')">Bookmark us!</a>
     
    84productions, Oct 18, 2009 IP
  5. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #5
    im using window XP and windows 7 not opera ...... thanks tough, that willl be good for another dper..... I just need the simple html code ive seen it before ... it is not that cody ........ lol
     
    Aaron111, Oct 18, 2009 IP
  6. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Here's the code, works on IE only.

    <a href="javascript:window.external.AddFavorite(window.location.href, window.document.title);">text, whatever</a>
    Code (markup):
    However, that means if I use Opera or other browsers to browse your page, I'll get a fake bookmark button.
    You can't force your visitors, except force them to leave. That's why every web designer spends his/her time on cross browser testing.
     
    myst_dg, Oct 18, 2009 IP