Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Open a URL in new tab

9 views
Skip to first unread message

macr...@gmail.com

unread,
Oct 2, 2006, 5:08:18 AM10/2/06
to
Hello to all extensions developers!

I've made a toolbar for firefox. The toolbar contains an item (menu).
As follow, see the code:

<menu id="partner-menu" label="Partner">
<menupopup id="misc-popup">
<menuitem label="Google.com"
oncommand="LoadURL('http://www.google.com/')" />
</menupopup>
</menu>

The Function "LoadURL" loads an URL in the Browser window:

function LoadURL(URL)
{
window._content.document.location = URL;
window.content.focus();
}

Is it possible to open the URL in a new tab?

Tony C

unread,
Oct 2, 2006, 9:44:05 AM10/2/06
to

macr...@gmail.com wrote:
> Is it possible to open the URL in a new tab?

I think this should help get you started:

var tab = getBrowser().addTab( url );

// And if you want it to load in foreground:
getBrowser().selectedTab = tab;

macringo

unread,
Oct 2, 2006, 4:49:17 PM10/2/06
to

Thank you! It is also possible to open a url in a new tab, when the
user the the about dialog? The about dialog shows into a new window.
I'am not sure how it is possible.

0 new messages