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

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">
        <ig:WebDialogWindow ID="wdwTimeout" runat="server" Height="300px" Width="400px" InitialLocation="Centered" WindowState="Hidden">
                <script type="text/javascript">

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

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


                    var dialog = $find('<%= wdwTimeout.ClientId %>');
                Click to extend session.<br />
                <asp:Button ID="btnExtend" runat="server" Text="Yes" />


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