Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: [DHTML] Modified Bookmark Site script

  1. #1
    Join Date
    Feb 2007
    Location
    Montreal
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [DHTML] Modified Bookmark Site script

    1) CODE TITLE: Modified Bookmark Site script

    2) AUTHOR NAME/NOTES: Dynamic Drive modified by Francois Lavertu

    3) DESCRIPTION: Modified version of the Bookmark Site script http://www.dynamicdrive.com/dynamicindex9/addbook.htm to support Opera (version 9 tested)

    4) URL TO CODE:

    or, ATTACHED BELOW (see #3 in guidelines below):
    Last edited by jscheuer1; 06-04-2011 at 11:55 AM. Reason: remove broken link

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

    Default

    Works! Give that coder a gold star.
    - John
    ________________________

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

  3. #3
    Join Date
    Feb 2007
    Location
    Montreal
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Webserver down

    My webserver is down so here's the code

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Test</title>
    <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 (v9 tested) */
    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>
    </head>
    
    <body>
    <a href="javascript:bookmarksite('Yahoo', 'http://www.yahoo.com');">Bookmark Yahoo</a>
    </body>
    </html>

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Wow... I didn't even know that script could be cross-browser. Good work.
    - Mike

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Indeed, nice and short too! Updated script to include the change. Thanks,

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

    Default

    Quote Originally Posted by ddadmin View Post
    Indeed, nice and short too! Updated script to include the change. Thanks,
    Yay!!!
    - John
    ________________________

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

  7. #7
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Wow, John. You're freakishly happy today
    - Mike

  8. #8
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I'll have what John's having please...

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

    Default

    Quote Originally Posted by ddadmin View Post
    I'll have what John's having please...
    That would be a cup of Earl Grey. A pot, er several pots, rather -some high end distressed bread (Pane Rustico - a 'Rustic and Chewy Peasant Bread with a Lightly Sour Flavor'). Those peasants really know how to live. And, you missed dinner here. If you like spicy food, you would probably have enjoyed my own recipe shoulder cut lamb chops.

    I am often amused and a little concerned that whenever I act a little silly around the forums, I feel as though others imagine I must be using some drug or drinking alcohol.

    Many years ago I volunteered at a rehab center. They asked me to tone it down or stop coming because all the recovering addicts thought I was high. So, you folks are not alone. Comfortingly though, the people running the center could tell the difference.

    Believe me, I have been sober in about the strictest sense of the term for over two years (I had a glass of champagne for New Years). That is if you exclude one's state of mind.

    But, don't mess with my internet connection, I might go into withdrawal.
    - John
    ________________________

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

  10. #10
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    First off, thank you a lot for the script!

    I have just one little question - is there a way to avoid that bookmarked pages in Mozilla will be opened in the sidebar?

    I tried all I could but I'm just hopeless with javascript.

    My problem is I have a frame site and many of my users have trouble bookmarking the subpages. The subpages can be loaded each one for itself within its frameset (like index.html?subpage) but my visitors do not seem to get it. They click 'bookmark' in their browser and end up with the main frameset instead.

    So I was happy to find your script working on both Mozilla and IE - when your script bookmarks the subpage just perfectly - if only the sidebar wouldn't come in..

    Is there anything I could do to avoid the sidebar thing?

    Thanks again, and I hope you do not mind my question..

    Catherina

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
  •