[Project_owners] Two questions

Tracy Norris tnorris at nc.rr.com
Mon Aug 2 00:11:19 EDT 2004

Can anyone out there answer a couple of questions.

1. I've noticed that "global" variables in javascript are only global to 
the xul file they are imported into (appearantly). Is there a way to 
pass information back to a parent xul when displaying a child dalog? For 
instance if I have this code:

function setPassword() {

which is called when a button is clicked in the preferences dialog. How 
do I pass the value entered in a textbox in the autofill_set_password 
dialog back to the preferences dialog  and store it in a global variable 
there? I've noticed some references on xulplanet which tell me how to 
set a xul element in the parent dialog, but not a java script variable.

2. Does anyone know how to have a dialog open centered within the window 
(or dialog) that opened it? For instance, in the example above , the 
resulting dialog opens in the upper left hand corner of the screen.. I'd 
like it to open in the center of the prefences dialog.

Any help is appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20040801/e1934c27/attachment.htm

More information about the Project_owners mailing list