I have a page with several links, and clicking some of them will open up a WebDialogWindow which contains an iFrame.
However, if I click link "a", closed the WebDialogWindow, then click link "b", I initially see the ASPX page that was the result from clikcing link "a", until the ASPX page that should be displayed after clicking link "b" takes over, i.e. when the browser received HTML to display.
Is there a way to set the ContentUrl of the ContentPane back to "about:blank" (or another URL) when the user closes the WebDialogWindow? This probably needs to be done on the client side.
Hi,
There is set_contentUrl(url) property of content pane. So, you may process dialog-closed event and change url to any desired value. Below is example with a test button.
<ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Width="300px" Height="300px"> <ClientEvents WindowStateChanged="stateChanged" /> <ContentPane ContentUrl="MyTargetUrl.aspx"> </ContentPane></ig:WebDialogWindow>
<script type="text/javascript">function stateChanged(dialog, evtArgs){ if(dialog.get_windowState() == $IG.DialogWindowState.Hidden) dialog.get_contentPane().set_contentUrl('BLOCKED SCRIPT""');}function showDialog(){ var dialog = $find('<%=WebDialogWindow1.ClientID%>'); dialog.set_windowState($IG.DialogWindowState.Normal);}</script><input type="button" value="show dialog" onclick="showDialog()" />
This works exactly as I hoped. Somehow I completely missed this tag/property when looking through the documentation:
<ClientEvents WindowStateChanged="stateChanged" />
Thanks, this solved it.