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
340
Issues showing WebDialogWindow
posted

I have a WebDialogWindow added to a page with ID="dlgSchedule"

In codebehind I wire up a button so that OnClientClick = "return ShowSchedule(document.getElementById('" + dlgSchedule.ClientID + "'));"

In javascript I have the following:

        function ShowSchedule(schedule)

        {

            schedule.set_windowState($IG.DialogWindowState.Normal);

            return false;

        }

schedule comes in as an HTMLDivElement; however, set_windowState is not defined and throws an error when called. Am I missing something here?

  • 22852
    Verified Answer
    Offline posted

    Hello,

    To get a reference to the WebDialogWindow on the client, you should use the ASP.NET AJAX $find method.  For example, changing the OnClientClick assignment to:

    OnClientClick = "return ShowSchedule($find('" + dlgSchedule.ClientID + "'));"

    should resolve your issue.

    The help has more information on getting a reference to an ASP.NET AJAX control on the client.

    Alan