[Project_owners] how to use global js variable use in two XUL files

Silver Surfer silver.surfer444 at gmail.com
Sat Aug 2 03:45:55 PDT 2008


Hi Eric,
thanks for your reply. I found another way to solve my problem. I set the
value for my variable in overlay.xul using this method,


> Application.storage.set("myobj", value);


and then I get the same value using this method in other xul file,

> var mydata= Application.storage.get("myobj", false);



thanks & regards,

SS


On Fri, Aug 1, 2008 at 10:54 PM, Eric H. Jung <eric.jung at yahoo.com> wrote:

>  Consider using javascript modules for global singleton variables.
>
> http://developer.mozilla.org/en/docs/Using_JavaScript_code_modules
> and
> http://developer.mozilla.org/en/docs/JavaScript_modules
>
> ----- Original Message ----
> From: Silver Surfer <silver.surfer444 at gmail.com>
> To: Mozdev Project Owners List <Project_owners at mozdev.org>
> Sent: Friday, August 1, 2008 7:03:10 AM
> Subject: [Project_owners] how to use global js variable use in two XUL
> files
>
>  Hi friends,
> I have one javascript variable which get the value in one XUL (overlay.xul)
> and I need to get that changed value in another XUL file. The relevant
> javascript variable has defined in a js file which is included in previous
> two XUL files. It is not functioning as I expect. Can you give me any ideas
> for solving it?
>
> thanks & regards,
> --
> ~Silver Surfer~
> Surfing through time & space
> http://risingofsilversurfer.blogspot.com/
>
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
>
>


-- 
~Silver Surfer~
Surfing through time & space
http://risingofsilversurfer.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mozdev.org/pipermail/project_owners/attachments/20080802/c53ce7b3/attachment.html>


More information about the Project_owners mailing list