|
#1
|
|||
|
|||
|
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: http://www.ombreinvisible.com/test/ or, ATTACHED BELOW (see #3 in guidelines below): |
|
#2
|
||||
|
||||
|
Works! Give that coder a gold star.
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#3
|
|||
|
|||
|
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
|
||||
|
||||
|
Wow... I didn't even know that script could be cross-browser. Good work.
|
|
#5
|
||||
|
||||
|
Indeed, nice and short too! Updated script to include the change. Thanks,
|
|
#6
|
||||
|
||||
|
Quote:
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#7
|
||||
|
||||
|
Wow, John. You're freakishly happy today
|
|
#9
|
||||
|
||||
|
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.
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#10
|
|||
|
|||
|
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 |
| Thread Tools | Search this Thread |
|
|