[Jslib] Re: Tabbrowser --- off topic
Pete Collins
pete@mozdev.org
Sat, 09 Feb 2002 09:31:28 -0500
Kramer wrote:
> Hi Folks,
>
> I know this is off topic... if there is a better place to ask
> please point me to the right place. Thanks
>
> I've been trying to understand how to code XUL to use tabbrowser element.
> I' ve read thru all the XUL planet docs/tutorials and poked thru
> /usr/lib/mozilla/chrome/navigator.jar (specifically navigator.xul and
> navigator.js)
>
> I'm able to get the tabs to display, but not able to get them to add
> content.
> Ive been mucking around with methods adTab and loadURL to no success
>
> If someone could point me in the right direction I'd greatly appreciate it.
>
> Regards,
> Kramer
You'd want to do something like this:
gBrowser = document.getElementById("content");
gBrowser.selectedTab = gBrowser.addTab('www.google.com');
--pete