Dec 20, 2010, 2:10 PM
[CLOSED] Problem to close Window which has another Window inside
I'm opening a window inside another window with the following code:
How can I solve this? Apparently the child window is not 'modal' enough, so it would be Ok if I just could mask the parent page..
Thank you!
x = openWindow('Venta Diaria', '../Operaciones/OperacionMaterialEditar.aspx, 650, 900, false, true, true, true, true, 'Cargando...', 'VentaDiaria' + ID, desk);
x.maximize();
function openWindow(title, url, height, width, maximizable, modal, resizable, autoscroll, closable, mask, id, desktop) {
var x = new Ext.Window
(
Ext.apply
(
{
id: id,
renderTo: Ext.getBody(),
resizable: resizable,
closeAction: 'close',
autoScroll: autoscroll,
bodyStyle: 'padding:5px;',
frame: true,
modal: modal,
closable: closable,
maximizable: maximizable,
autoLoad:
{
maskMsg: mask,
showMask: true,
mode: "iframe", // "merge",
url: url
}
},
{ title: title,
height: height,
width: width
}
)
);
if (desktop != null) {
desktop.getManager().register(x);
}
x.show();
return x;
}
If I close the child window at first and then the parent it works excellent. The problem appears when I close directly the parent window. It seems like the child window stays 'alive' and when I open the parent again I have the following error:o.setZIndex(l+(n*10))
(Error message: Can't excecute code from a freed script)How can I solve this? Apparently the child window is not 'modal' enough, so it would be Ok if I just could mask the parent page..
Thank you!
Last edited by geoffrey.mcgill; Dec 21, 2010 at 6:22 PM.
Reason: [CLOSED]