On Wed, May 4, 2011 at 22:47, Benjamin Turner <[email protected]> wrote:
> Hello,
>
> I'm sort of stuck. I'm creating a modal window from another window.
> Inside this modal window, it will have say a text box where you can input
> the string. After they click "OK" on this modal window with the string, I
> want it to modify the parent window that it was created from. How can I do
> this?
>
Here's one possible solution.
Presumably, the parent window created the modal window, so has a reference
to it. Before opening the modal window, the parent can do:
// Save the label object where the string will be placed
modalWindow.setUserData("parentField", myLabel);
The modal window can then, when it gets its "close" event, modify the
parent:
// "this" is the modal window
this.addListener("close",
function(e)
{
// Get the parent field to which we want to set the modal
window-obtained string
var parentField = this.getUserData("parentField");
// Get the value from the text field in the modal window
var string = textField.getValue();
// Set the parent field with the string value
parentField.setValue(string);
});
There are many other implementations to do the same thing, but this should
give you some ideas.
Derrell
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel