Alexander Deruwe wrote:
>
> Hey there,
>
> I, too, am new here. :)  Looping through open windows, or getting at  
> a previously opened window, how can one do that exactly?
> Having a similar problem, in the sense that I open a new window as such:
>
>      var destinationEditWindow = new Window({url: 'script.php', ...);
>      destinationEditWindow.showCenter(true);
>
> Then from within the form in 'script.php' I want to add a button to  
> close the current window.
> Is this possible?

Yes, using standard JavaScript. The simple way (but architecturally not 
a good thing to do) is:

destinationEditWindow.destroy();

assuming you made the destinationEditWindow a global variable.
But rather you want some classes that do the trick for you and you 
communicate with your classes. Then, after some coding, it becomes (if 
it is a static class):

Some.Class.Here.closeCurrentWindow()

where the details of variables and logic for finding the current window 
are soundly hidden in the Some.Class.Here class. But the level of 
abstraction in your code and the level of OO you want to use with JS, is 
all up to you of course.

Cheers,
-- Abel



_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to