Notices

Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help > Submit a DHTML or CSS code
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 02-08-2007, 04:00 PM
frankyboy frankyboy is offline
New Comer (less than 5 posts)
 
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: http://www.ombreinvisible.com/test/

or, ATTACHED BELOW (see #3 in guidelines below):
Reply With Quote
  #2  
Old 02-08-2007, 04:10 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,991
Thanks: 19
Thanked 1,132 Times in 1,118 Posts
Blog Entries: 3
Default

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
Reply With Quote
  #3  
Old 02-08-2007, 04:41 PM
frankyboy frankyboy is offline
New Comer (less than 5 posts)
 
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>
Reply With Quote
  #4  
Old 02-08-2007, 10:17 PM
mburt's Avatar
mburt mburt is offline
Elite Coders
 
Join Date: Jul 2006
Location: Canada
Posts: 2,507
Thanks: 5
Thanked 22 Times in 22 Posts
Default

Wow... I didn't even know that script could be cross-browser. Good work.
Reply With Quote
  #5  
Old 02-08-2007, 10:51 PM
ddadmin's Avatar
ddadmin ddadmin is offline
Administrator
 
Join Date: Aug 2004
Posts: 7,626
Thanks: 2
Thanked 639 Times in 629 Posts
Blog Entries: 13
Default

Indeed, nice and short too! Updated script to include the change. Thanks,
Reply With Quote
  #6  
Old 02-08-2007, 11:04 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,991
Thanks: 19
Thanked 1,132 Times in 1,118 Posts
Blog Entries: 3
Default

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

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #7  
Old 02-08-2007, 11:10 PM
mburt's Avatar
mburt mburt is offline
Elite Coders
 
Join Date: Jul 2006
Location: Canada
Posts: 2,507
Thanks: 5
Thanked 22 Times in 22 Posts
Default

Wow, John. You're freakishly happy today
Reply With Quote
  #8  
Old 02-09-2007, 12:34 AM
ddadmin's Avatar
ddadmin ddadmin is offline
Administrator
 
Join Date: Aug 2004
Posts: 7,626
Thanks: 2
Thanked 639 Times in 629 Posts
Blog Entries: 13
Default

I'll have what John's having please...
Reply With Quote
  #9  
Old 02-09-2007, 03:48 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,991
Thanks: 19
Thanked 1,132 Times in 1,118 Posts
Blog Entries: 3
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.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #10  
Old 02-09-2007, 11:42 PM
Schatana Schatana is offline
New Comer (less than 5 posts)
 
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
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:07 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.