Obi1-Cannabis Posted June 14, 2007 Share Posted June 14, 2007 hi,i have this function in javascript to add bookmarks in any browser (or so i think...) it's working ok, though i just tested it with ie7 and firefox 2. The problem in Firefox is that when i open the saved bookmark it opens on side pannel here is the function: function Favoritos(){ var title="Page Name" var url="http://www.domain.com" if (window.sidebar){ window.sidebar.addPanel(title, url,""); } else if( window.opera && window.print ){ var mbm = document.createElement('a'); mbm.setAttribute('rel','sidebar'); mbm.setAttribute('href',url); mbm.setAttribute('title',title); mbm.click();} else if( window.external ){ window.external.AddFavorite( url, title); }} if anyone nows how to make it to open how it is suposed please let me know. Also you can try it whith opera and netscape and tell me if it works. Link to comment Share on other sites More sharing options...
Obi1-Cannabis Posted June 14, 2007 Author Share Posted June 14, 2007 by the way, why doesn't this work in firefox? function clearOptions(selectId) { for (i=document.getElementById(selectId).options.length;i>=0;i--) document.getElementById(selectId).options.remove(i); } Edit1:Solved this one. my solution for anyone interested: function clearOptions(selectId) { for (i=document.getElementById(selectId).options.length;i>=0;i--) if(window.opera || window.print || window.sidebar){ document.getElementById(selectId).options[i] = null; }else if (window.external){ document.getElementById(selectId).options.remove(i); } Link to comment Share on other sites More sharing options...
Obi1-Cannabis Posted June 14, 2007 Author Share Posted June 14, 2007 ok, for what i have found googling i guess this is more than discussed and there's no way arraound the bookmark thing on the side panel until the developers of firefox do something about it... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.