"add this site to your bookmarks" in firefox

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jan 2007
Posts: 4
Reputation: heepofajeep is an unknown quantity at this point 
Solved Threads: 0
heepofajeep heepofajeep is offline Offline
Newbie Poster

Re: "add this site to your bookmarks" in firefox

 
0
  #11
Jan 22nd, 2007
Originally Posted by pablo99 View Post
Hi Dave,

I'm using Firefox 1.0.6 and as I say the bookmark opens in the sidebar. I see there is an option in the bookmark properties to turn it off, but for some reason it defaults to on when the bookmark is created.

Pablo
X2... I am using Firefox 2.xx
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 4
Reputation: heepofajeep is an unknown quantity at this point 
Solved Threads: 0
heepofajeep heepofajeep is offline Offline
Newbie Poster

Re: "add this site to your bookmarks" in firefox

 
0
  #12
Jan 28th, 2007
???
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 2
Reputation: Aegist is an unknown quantity at this point 
Solved Threads: 0
Aegist Aegist is offline Offline
Newbie Poster

Re: "add this site to your bookmarks" in firefox

 
0
  #13
Apr 13th, 2007
Hi, two things. First the question about dynamic website name. I use a bit javascript to determine the url (location.href) and then a bit of javascript to determine the pages title (document.title) and assign variables to them. Then use those variables in the link.

I'll give the whole code I use, because my one is slightly different, but really the only difference is the pageurl and pagetitle variables I have set.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <script type="text/javascript">
  2. var pageurl=location.href;
  3. var pagetitle=document.title;
  4.  
  5. function bookmarksite(title,url){
  6. if (window.sidebar)
  7. window.sidebar.addPanel(title, url, "");
  8. else if(window.opera && window.print){
  9. var elem = document.createElement('a');
  10. elem.setAttribute('href',url);
  11. elem.setAttribute('title',title);
  12. elem.setAttribute('rel','sidebar');
  13. elem.click();
  14. }
  15. else if(document.all)
  16. window.external.AddFavorite(url, title);
  17. }
  18. </script>
  19. <p class="newstext"><a class="news" href="javascript:bookmarksite(pagetitle, pageurl)">Bookmark this page</a></p>


Second thing: Firefox. I'm having the sidebar problem too. And i have firefox 2.x. You can save the bookmark fine, but when you try to open it, it opens in the sidebar. Pretty useless for actually visiting a site!

Anyone have a solution to this?
Last edited by Aegist; Apr 13th, 2007 at 1:21 am. Reason: added entire code
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 2
Reputation: Aegist is an unknown quantity at this point 
Solved Threads: 0
Aegist Aegist is offline Offline
Newbie Poster

Re: "add this site to your bookmarks" in firefox

 
0
  #14
Apr 13th, 2007
Just want to subscribe to the thread...
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 1
Reputation: maa_ku is an unknown quantity at this point 
Solved Threads: 0
maa_ku maa_ku is offline Offline
Newbie Poster

Re: "add this site to your bookmarks" in firefox

 
0
  #15
May 21st, 2007
DaveSW, great script! thanks!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC