943,838 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jan 22nd, 2007
0

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

Click to Expand / Collapse  Quote originally posted by pablo99 ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
heepofajeep is offline Offline
4 posts
since Jan 2007
Jan 28th, 2007
0

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

???
Reputation Points: 10
Solved Threads: 0
Newbie Poster
heepofajeep is offline Offline
4 posts
since Jan 2007
Apr 13th, 2007
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Aegist is offline Offline
2 posts
since Apr 2007
Apr 13th, 2007
0

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

Just want to subscribe to the thread...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Aegist is offline Offline
2 posts
since Apr 2007
May 21st, 2007
0

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

DaveSW, great script! thanks!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
maa_ku is offline Offline
1 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: What do you use to parse the url?
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: AJAX not working on firefox





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC