I am opening a popup window using webdialogwindow while clicking on html link ( <A href="#" onclick="BLOCKED SCRIPTopeninv();" id="lnkSearch" runat="server" style="color:Green;font-weight:bold;">Search</A>).
Below are the code for the openinv(); function which is executing while clicking the link.
var url = 'InvoiceLookup.aspx?custcode=' + custid + '&txncode=' + txncode;
var dialog = $find('<%= wdInvLookUp.ClientID %>');
dialog.get_contentPane().set_contentUrl(url);
dialog.show(); if (dialog.get_windowState() != $IG.DialogWindowState.Normal) dialog.set_windowState($IG.DialogWindowState.Normal);
ASPX for the webdialogwindow
<asp:UpdatePanel ID="upd1" runat="server"> <ContentTemplate> <ig:WebDialogWindow onunload="wdInvLookUp_Unload" onstatechanged="wdInvLookUp_StateChanged" OnDisposed="wdInvLookUp_Disposed" OnResized ="wdInvLookUp_Resized" OnMoved="wdInvLookUp_Moved" ID="wdInvLookUp" InitialLocation="Centered" Modal="true" runat="server" Height="80%" Width="90%" DesignTimeMinimize="True" WindowState="Hidden" StyleSetName="Pear" > <ContentPane> </ContentPane> <Header CaptionText="Invoice Lookup" CaptionAlignment="Left"> </Header> <Resizer Enabled="True" /> </ig:WebDialogWindow> </ContentTemplate> </asp:UpdatePanel>
The target page (InvoiceLookup.aps) contains 2 text boxes to enter search criteria and a gridview to display the search result.
The problem I am facing is the popup window closes automatically when I click on the link for the first time after the parent page loaded. But the popup opens properly from the second attempt onwards. This happens on some instance only. Can you please suggest any solution for this?.Please note that the html link is inside a div which is placed in UpdatePanel.
Thanks in advance.
Rasheed
Hello Mohammed,
Thank you for posting in our forums!
I am doing research on opening a popup window using webdialogwindow and not able to understand the behavior about window closing automatically. Would you be able to provide me some more information like what is “some” instance when popup window closes automatically?
Which version of dll you are using? Can you please provide me small isolated sample to reproduce the same behavior?
Let me know if I may be of further assistance.
Hello Divya,
Thanks for your reply.
I am attaching the code which is copied from my project.
Please note that that in the page load of the popup I am assigning the query string values to local variables. As mentioned earlier this issue is not occurring every time. But I cant point out any specific scenario when the issue occurs. Can say it happens 1 out of 5 attempts that too clicking for the very first time after the page loaded. It never happens from second attempt on wards for a particular session. I debugged the code and the popup is closing after executing the Page_Load event.
The version we are using is "12.1.20121.2178".
Thanks,
Rasheed Mohammed