Hi Geoffrey,
my situation is a bit diffenent. I'm trying to implement a desktoplike applicatiopn using Coolite.Desktop in ASP.NET MVC.
Here is my scenario, I have a page loaded after user login that contains my desktop
<ext:Desktop ID="MyDesktop" runat="server" BackgroundColor="Black">
in the same page I've defined this functiopn to dynamically open windows without defining them as controls on the page.
function OpenDeskWindow(title, webUrl, width, height, config) {
var desk = MyDesktop.getDesktop();
if (config == null)
config = {};
if (config.autoLoad == null)
config.autoLoad = {};
Ext.applyIf(config, {
title: title,
width: width,
height: height,
maximizable: true,
minimizable: true,
})
Ext.applyIf(config.autoLoad, {
url: webUrl,
mode: "iframe",
showMask: true
});
var w = desk.createWindow(config);
w.center();
w.show();
}
From the opened window i can open a new window in the desk using a call like this
parent.OpenDeskWindow();
but from the opened window (inside iframe) I'm only able to close the window with a call like this
parent.MyDesktop.getDesktop().getManager().getActive().hide();
and even with this solution if I focus a different window and click on a button on a inactive window that call the above function window isn't the one active and I close the wrong one.
I must admit that this is my first project using Coolite/ExtJs and making extensive use of javascript, so any help is really appreciated.