User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,658 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,351 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 20899 | Replies: 14
Reply
Join Date: Jan 2007
Posts: 4
Reputation: heepofajeep is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
heepofajeep heepofajeep is offline Offline
Newbie Poster

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

  #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  
Join Date: Jan 2007
Posts: 4
Reputation: heepofajeep is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
heepofajeep heepofajeep is offline Offline
Newbie Poster

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

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

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

  #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.

<script type="text/javascript">
var pageurl=location.href;
var pagetitle=document.title;

function bookmarksite(title,url){
if (window.sidebar) 
    window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ 
    var elem = document.createElement('a');
    elem.setAttribute('href',url);
    elem.setAttribute('title',title);
    elem.setAttribute('rel','sidebar');
    elem.click();
} 
else if(document.all)
    window.external.AddFavorite(url, title);
}
</script>
<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 12:21 am. Reason: added entire code
Reply With Quote  
Join Date: Apr 2007
Posts: 2
Reputation: Aegist is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Aegist Aegist is offline Offline
Newbie Poster

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

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

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

  #15  
May 21st, 2007
DaveSW, great script! thanks!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:42 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC