Re: [xul-interop] Querry element from different window

Wellington Carvalho <[email protected]> Tue, 24 May 2011 17:16:41 -0300
Newsgroups gmane.comp.lang.xul.general
Message-ID <[email protected]>
--===============5445784401338068124==
Content-Type: multipart/alternative; boundary=0015174769805094a004a40b4567

--0015174769805094a004a40b4567
Content-Type: text/plain; charset=ISO-8859-1

Maybe this can help:
https://developer.mozilla.org/en/Working_with_windows_in_chrome_code#Passing_data_between_windows


*
Wellington B. de Carvalho
*


On Tue, May 24, 2011 at 7:32 AM, Tomas Trescak <[email protected]>wrote:

> 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
> _______________________________________________
> xul-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xul-talk
>

--0015174769805094a004a40b4567
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Maybe this can help:<div><meta http-equiv=3D"content-type" content=3D"text/=
html; charset=3Dutf-8"><a href=3D"https://developer.mozilla.org/en/Working_=
with_windows_in_chrome_code#Passing_data_between_windows">https://developer=
.mozilla.org/en/Working_with_windows_in_chrome_code#Passing_data_between_wi=
ndows</a><br clear=3D"all">

<div><br></div><div><br></div><i><div style=3D"text-align:left"><span style=
=3D"font-style:normal"><i>Wellington B. de Carvalho</i></span></div></i><br=
>
<br><br><div class=3D"gmail_quote">On Tue, May 24, 2011 at 7:32 AM, Tomas T=
rescak <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">tomi=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"=
>

Hello<br>
<br>
I&#39;m a bit desperate to solve, in my opinion a trivial thing.<br>
I have a toolbar and a sidebar.<br>
<br>
I want buttons from the toolbar affecting content of a sidebar.<br>
My problem is that for example document.getElementById(&#39;id&#39;) does n=
ot retreive elements from other XUL files (it is logical). But how can I ac=
cess such elements? It has to through &quot;window&quot; .. I just don&#39;=
t know how.<br>


<br>
Imagine having following defined in the sidebar:<br>
&lt;command id=3D&quot;cmd_openhelp&quot; oncommand=3D&quot;alert(&#39;Help=
!&#39;);&quot;/&gt;<br>
<br>
And I want following button from the toolbar to call it:<br>
&lt;button label=3D&quot;do&quot; oncommand=3D&quot;goDoAction(....... cmd_=
openhelp)&quot; /&gt;<br>
<br>
Any help is greatly appreciated!<br>
<br>
Thank You and have a greatest day!<br>
<br>
Tomas<br>
---------------------------------------------------------------------------=
---<br>
vRanger cuts backup time in half-while increasing security.<br>
With the market-leading solution for virtual backup and recovery,<br>
you get blazing-fast, flexible, and affordable data protection.<br>
Download your free trial now.<br>
<a href=3D"http://p.sf.net/sfu/quest-d2dcopy1" target=3D"_blank">http://p.s=
f.net/sfu/quest-d2dcopy1</a><br>
_______________________________________________<br>
XUL News Wire =A0 =A0 =A0- <a href=3D"http://xulnews.com" target=3D"_blank"=
>http://xulnews.com</a><br>
XUL Job Postings =A0 - <a href=3D"http://xuljobs.com" target=3D"_blank">htt=
p://xuljobs.com</a><br>
Open XUL Alliance - <a href=3D"http://xulalliance.org" target=3D"_blank">ht=
tp://xulalliance.org</a><br>
_______________________________________________<br>
xul-talk mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]=
e.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/xul-talk" target=3D=
"_blank">https://lists.sourceforge.net/lists/listinfo/xul-talk</a><br>
</blockquote></div><br></div>

--0015174769805094a004a40b4567--


--===============5445784401338068124==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
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
--===============5445784401338068124==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
XUL News Wire      - http://xulnews.com
XUL Job Postings   - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org  
_______________________________________________
xul-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xul-talk

--===============5445784401338068124==--