PDA

View Full Version : modal Dialog in a modal Dialog (second is behind)



michik
10 Jun 2008, 4:40 AM
hi,

i open a modal Dialog. in this modal Dialog there is a button, which is opening another modal Dialog. but the scond one appears behind the first.

i tried to set z-index for the second one like dialog.setStyleAttribute("z-index", 3000), but it doesn't work

please help. i want the second modal dialog ofer the first and if the second is closing, the first is still there.

tx and greetings michi

DServe
10 Jun 2008, 5:25 AM
Are you re-using an existing object for your second modal window ?
for example I use :


if (myWin){myWin.destroy();}
myWin=new Ext.Window({
....
modal:true,
....
})

If it's not the case please post some code

michik
10 Jun 2008, 5:42 AM
hi,

thank you for your answere ...

i'm using not gxt js. i'm using Ext GWT (http://extjs.com/forum/../products/gxt/).

i create my modal Dialog with
Dialog d1 = new Dialog();
d1.setModal(true);
d1.show();

and in this Dialog i have a Button opening a scond one. i create the second dialog in the same way as i do it first.

Dialog d2 = new Dialog();
d2.setModal(true);
d2.show();

but the Dialog d2 is behind the Dialog d1

greetings
michi

gslender
10 Jun 2008, 11:48 AM
post complete working code - as per http://extjs.com/forum/showthread.php?t=33778