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
110
$find not working, I get 'Error: 'dialog' is null or not an object'
posted

I think I'm doing this right, but... not working.

 

I have a master page, and the master includes an ascx control.  In this ascx control, I have the following code:

 

<asp:UpdatePanel ID="uplTimeout" runat="server">
    <ContentTemplate>
        <ig:WebDialogWindow ID="wdwTimeout" runat="server" Height="300px" Width="400px" InitialLocation="Centered" WindowState="Hidden">
           <ContentPane>
            <Template>
                <script type="text/javascript">

                    function setDialogTimer() {
                        var t = setTimeout('showDialog', 5000);
                    }

                    function showDialog() {
                        var dialog = $find('<%= wdwTimeout.ClientId %>');
                        dialog.show();
                    }

                    setDialogTimer();

                    var dialog = $find('<%= wdwTimeout.ClientId %>');
                    dialog.show();
                   
                </script>
               
                Click to extend session.<br />
               
                <asp:Button ID="btnExtend" runat="server" Text="Yes" />
               
            </Template>
           </ContentPane>
        </ig:WebDialogWindow>
    </ContentTemplate>
</asp:UpdatePanel>

 

The code above does not represent what I'm actually trying to do, but what I'm trying to do now to see if I can get it to work, in practice, the last two lines would be gone from the script.  However, that is where I get an error that it is not finding the WebDialogWindow

Parents Reply Children