[xul-interop] Querry element from different window

Tomas Trescak <[email protected]> Tue, 24 May 2011 20:32:53 +1000
Newsgroups gmane.comp.lang.xul.general
Message-ID <[email protected]>
Hello

I'm a bit desperate to solve, in my opinion a trivial thing.
I have a toolbar and a sidebar.

I want buttons from the toolbar affecting content of a sidebar.
My problem is that for example document.getElementById('id') does not retreive elements from other XUL files (it is logical). But how can I access such elements? It has to through "window" .. I just don't know how.

Imagine having following defined in the sidebar:
<command id="cmd_openhelp" oncommand="alert('Help!');"/>

And I want following button from the toolbar to call it:
<button label="do" oncommand="goDoAction(....... cmd_openhelp)" />

Any help is greatly appreciated!

Thank You and have a greatest day!

Tomas
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
XUL News Wire      - http://xulnews.com
XUL Job Postings   - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org