logo       

Re: How to load the Search Sidebar Panel using Javascript?: msg#00035

mozilla.devel.dom

Subject: Re: How to load the Search Sidebar Panel using Javascript?



Brendan Eich wrote:

Robert Oschler wrote:

Would you happen to know how to load the Search Sidebar in Mozilla/Firefox?

The Javascript command:

open(URL, '_search');

works fine under IE, but under Mozilla/Firefox it opens a brand new window
instead of loading the Search Sidebar.


Wrong newsgroup. See headers. DOM folks, is there a de-facto standard here worth emulating?

IE documentation here
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp
says that _search is supported since IE 5.
A test with Opera 7.50 opens a normal window (well tabbed window with Opera's tabbed interface).
I don't remember whether there is any window.open way supported by Mozilla/Netscape to open a page in the sidebar, Netscape devedge is down where I think there are articles on how to script the sidebar.
xulplanet shows the following nsISidebar interface:
http://xulplanet.com/references/xpcomref/ifaces/nsISidebar.html
so if you do
if (window.sidebar && window.sidebar.addPanel) {
window.sidebar.addPanel('JavaScript FAQTS', 'http://JavaScript.FAQTS.com/', '');
}
Netscape prompts for confirmation whether to add that panel to the sidebar.
There is also the a method addSearchEngine supposed to add a search engine panel so I guess that is what the original poster is looking for.

--

Martin Honnen
http://JavaScript.FAQTs.com/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise