Results 1 to 2 of 2

Thread: Bookmark Site script and Chrome?

  1. #1
    Join Date
    Mar 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Bookmark Site script and Chrome?

    1) Script Name: Bookmark Site script:

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/addbook.htm

    3) Describe problem:

    Ok it works in FF but not in Chrome. Is there a way to tweak this scrip to make it work correctly with Chrome? or if not add a test that will hide it in Chrome? am already using jQuery so can just use .hide but would prefer if it can be that the book mark link works in Chrome

    Head is:

    <script type="text/javascript">

    /***********************************************
    * Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/

    /* 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>

    Body is:

    <a href="javascript: bookmarksite(document.title, window.location.href)">Bookmark Page</a>

    I see from the code this has been re done to support FF, Opera, and IE. Hope some one knows what additional else if needs to be added for Chrome, or if not can help me add an else if to hide the link for Chrome

    .......


    Another problem when you use the book mark it creates in FF4 it does not load the page in stead it open a window on the side next to the current page. is there a way to ttweek it so the book marked page open as a normal bookmark as it should?



    Thanks in advance
    Last edited by newbi462; 06-03-2011 at 03:18 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Try the bookmark button here (upper right):

    http://molendijk.110mb.com/dynamic/index.html

    As mentioned here:

    http://www.dynamicdrive.com/forums/s...8&postcount=26
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •