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
75
Webdialogue window closes automatically.
posted

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