Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Webdialogue window closes automatically.

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 %>');

if (dialog.get_windowState() != $IG.DialogWindowState.Normal)

ASPX for the webdialogwindow

<asp:UpdatePanel ID="upd1" runat="server">
<ig:WebDialogWindow onunload="wdInvLookUp_Unload"
OnResized ="wdInvLookUp_Resized"
ID="wdInvLookUp" InitialLocation="Centered" Modal="true" runat="server" Height="80%"
Width="90%" DesignTimeMinimize="True"
WindowState="Hidden" StyleSetName="Pear" >
<Header CaptionText="Invoice Lookup" CaptionAlignment="Left">
<Resizer Enabled="True" />
</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.