I have a page with 12 buttons that each open a different page. I want each page to show up in a WebDialogWindow but I want to use one WebDialogWindow because I don't want to set the ContentUrl for 12 WebDialogWindows since that is too many pages to preload. I am having two problems with this situation. The first problem is that when I refresh the iframe the parent page and the WebDialogWindow are both refreshing which isn't aesthetically pleasing. The second problem is that if a button is clicked to show the page in the WebDialogWindow and then it's closed and another button is clicked to show another page the previous page still shows in the Dialog and a couple seconds later it is refreshed and shows the new page. This is the javascript function I am currently using.
{
dialog.get_contentPane().set_contentUrl(contentUrl);
dialog.show();
dialog.get_contentPane().get_iframe().refresh();
dialog.get_header().setCaptionText(title);
}
Check out this post
http://forums.infragistics.com/forums/p/29802/149113.aspx#149113
This is how I have mine set up and it clears out the webdialogwindow when it closes.
<ig:WebDialogWindow runat="server" SkinID="CustomWidth" ID="MP_WebDialog1" InitialLocation="Manual" Height="600px" Width="1000px" Modal="true" WindowState="Hidden" Style="z-index: 9000; line-height: normal;" Top="-1px" Left="-1px" Resizer-Enabled="True" > <ClientEvents WindowStateChanged="stateChanged" /> <Header CaptionAlignment="Left" CaptionText="" Height="20px"> <CloseBox Visible="True" /> </Header> <ClientEvents Moved="MoveToTop" /> <ContentPane BackColor="White"> <Template> <div style="text-align: center; position: relative;"> <iframe id="Iframe2" src="dummyBlank.htm" scrolling="yes" width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0" allowtransparency="true" runat="server"></iframe> </div> </Template> </ContentPane> </ig:WebDialogWindow>
<script type="text/javascript">function stateChanged(dialog, evtArgs){ if(dialog.get_windowState() == $IG.DialogWindowState.Hidden) dialog.get_contentPane().set_contentUrl('dummyBlank.htm');}</script>