View Full Version : True modal window when using framesets?

6 Nov 2009, 1:20 PM
With window set to modal how to prevent close of browser or click on another link when I am using framesets in my legacy application? The main frame disables correctly... but the others do not and thus a user can click on another link while a dialog is open.

Please help.

7 Nov 2009, 12:17 AM
You will have to mask() the bodies of the other frames yourself, because Ext doesn't know about them.

7 Nov 2009, 6:25 AM
@paulwoll --
Assuming you could (trying this) mask the top document and style it accordingly,

var topMaskEl = Ext.fly(top.document.body).mask();
"background-color" :"#CCCCCC",
height :'100%',
left :0,
top : 0,
width :'100%',
'z-index' :1000 //reign supreme !
the trick would be to get your modal Ext.Window to render on-top of the top-level mask...

You could show top-level-mask first, then render the Ext.Window onto it, then show it but, it's likely some of your key listeners might not work. :-?

new Ext.Window({
modal : true,
renderTo : topMaskEl,
listeners : {
close : function(){ topMaskEl.remove() },
delay : 100

But hey, how desperate are you? =P~
Tweak it.