PDA

View Full Version : [Solved] BasicDialog inner contents are hidden



guptan
15 Jul 2007, 3:34 AM
I've implemented a BasicDialog as follows:



function showDialog() {
var dialog = null;
if(!dialog) {
dialog = new Ext.BasicDialog("fields-dlg", {
modal: true,
width:800,
height:500,
shadow:true,
minWidth:300,
minHeight:300,
proxyDrag: true
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Close', dialog.hide, dialog);
}
dialog.show();
return false;
}




<div id="fields-dlg" style="visibility: hidden; position: absolute; top: 0px;">
<div class="x-dlg-hd">
Business Rules
</div>
<div class="x-dlg-bd" style="background-color: white;">
<iframe id="frBusinessRules" width="760px" noresize="noresize" allowtransparency="true"
frameborder="0" runat="server" height="590px" src="BusinessRules.aspx"></iframe>
</div>
</div>


BasicDialog is generated and displayed on 'onclick' event of an ASP.NET button control. Though BasicDialog and IFRAME are getting displayed on first click of the button, consecutive clicks display BasicDialog only, with no contents inside. Anyone experienced similar issues?

evant
15 Jul 2007, 3:45 AM
It's quite possible the div is being destroyed after you close the dialog.

Also, in your code, your first check is redundant, because you're setting the dialog to null at the beginning of the function, so the condition will always be true.

guptan
15 Jul 2007, 4:08 AM
Oops I made a blunder. var dialog has to be declared as global. Problem has been solved. Thanks evant.