<input type="button" id="show-win" value="Show Window"/>
<script type="text/javascript">
Ext.onReady(function(){
var panelContent;
var win;
var button = Ext.get('show-win');
button.on('click', function(){
if (!win) {
// content for window
panelContent = new Ext.Panel({
region: 'center',
margins: '0 0 0 0',
autoScroll: true,
html: '<iframe style="overflow:auto;width:100%;height:100%;" frameborder="0" src="f?p=&APP_ID .:2023:&SESSION_ID ."></iframe>'
});
win = new Ext.Window({
title: 'Popup Window',
closable: true,
closeAction: 'hide',
width: 600,
height: 600,
border:false,
plain: true,
layout: 'border',
items: [panelContent],
buttons: [{
text: 'Close',
handler: function(){
win.hide();
}
}]
});
};
win.show(this);
});
});
</script> |