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.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.
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.
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".
Hello Rasheed ,
I am working on that and will provide you my update by tomorrow EOD.
I am not able to reproduce the behavior of WebDialogWindow closing automatically after executing the Page Load event.
I made a sample in this I am using ig:WebDialogWindow control and for popup the grid i am using queristring passing with local variable , make sure local variables are not null.
And instead of asp:GridView I am using Infragistics control WebDataGrid as it perform the same functionality as grid view does.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, If the project does show the product feature working correctly, this indicates a possible problem in the code of your application.
Please let me know which browser you are using? Did you try same behavior with the different browser too?
Let me know if I can provide any further assistance
Thank you so much for your help.
I open the popup after selecting one value from a dropdown. The popup button and dropdwon control were placed inside an update panel.
I found the issue happens just because the user opens the popup before the update panel completes the rendering after the dropdwon selected index change event. I had to remove the update panel for the time being so that the user will wait for the page to render completely and click the button to open the popup. Hence that resolves my issue. Thank you so much for your sincere effort to resolve the issue.