Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Retrieving values from dialog box
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Neil  
View profile  
 More options Mar 21 2005, 5:03 pm
Newsgroups: netscape.public.dev.xul
From: Neil <n...@parkwaycc.co.uk>
Date: Mon, 21 Mar 2005 22:03:17 +0000
Local: Mon, Mar 21 2005 5:03 pm
Subject: Re: Retrieving values from dialog box

Matthew Gertner wrote:
>var dlg = window.openDialog(..., "modal");
>var result = dlg.myproperty;

I have this nasty suspicion that the window.close of the dialog destroys
all of the global variables making it impossible to return a property.
Generally the most convenient way is to pass input and output parameters
in a JavaScript object e.g.
function showDialog(aIn) {
    var params = { in: aIn, out: null };
    window.openDialog(..., "modal", params);
    return params.out;
}

then the dialog's script would have
var params = window.arguments[0];
var in = params.in;
etc.

--
Warning: May contain traces of nuts.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.