[Project_owners] Global variables

Davide Carboni dcarboni at crs4.it
Mon Feb 2 11:30:57 EST 2004


Biju G C wrote:

> --- Davide Carboni <dcarboni at crs4.it> wrote: 
>  
>
>>I wonder how a variable can be shared between scripts in different 
>>windows. I know that one can pass objects in the openDialog(...) that 
>>are visible to child windows but I have the need to share a data between 
>>windows that are not child/parent
>>    
>>
>
>Using Window mediator we can loop thru all opened windows
>(If you search the archive you can get that code)
>Once you get the window then window.varname to get value
>
>see
>http://www.mozdev.org/lxr/http/source/recall/package/recall.js#L55
>
>change enumerator.getNext("navigator:browser");
>to enumerator.getNext(""); 
>to get all types of windows
>
>also see "exchange data between instance" thread at    
>http://mozdev.org/pipermail/project_owners/2003-September/date.html#414
>
>  
>

Thank you. I was already thinking a solution like that. I found it a 
little bit "kludgy" but  as you confirm that it works I'll use it.

D.





More information about the Project_owners mailing list