// panel.js var dlgPanel = function(config) { this.close = 'close'; this.width = 800; this.height = 600; //var p = getDocumentParent(); Ext.apply(this, config); var iframe = document.createElement('iframe'); iframe.name = Ext.id(); iframe.frameBorder = 'no'; iframe.width = '100%'; iframe.height = '100%'; iframe.src = this.url; var dialog = new Ext.Window({ closeAction: this.close, layout: 'fit', title: this.title, width: this.width, height: this.height, modal: this.modal, contentEl: iframe }); function onIframeLoad() { iframe.contentWindow.dialog = dialog; } if (iframe.addEventListener) { iframe.addEventListener("load", onIframeLoad, false); } else if (iframe.attachEvent) { iframe.attachEvent("onload", onIframeLoad); } dialog.show(); return dialog; };