Object Doesn't Support this Property or Method

2 posts, 0 answers
  1. Ryan
    Ryan avatar
    61 posts
    Member since:
    Jul 2009

    Posted 31 Jan 2011 Link to this post

    I'm trying to show/hide a loading panel based on what control made the request.  My javascript is as follows:

    var objLoadingPanel = "";
    var objPageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
    objPageRequestManager.add_initializeRequest(RequestInitializing);
    objPageRequestManager.add_endRequest(RequestEnding);
    function RequestInitializing(sender, eventArgs) {
        objLoadingPanel = $find("<%=lpLoadingPanel.ClientID%>");
        if (eventArgs.get_eventTarget() == "<%=btnRefresh_SpendingStatus.ClientID%>") objUpdatedControl = "<%=lblChart_Status.ClientID%>";
        //show the loading panel over the updated control
        objLoadingPanel.show(objUpdatedControl);
        //objLoadingPanel.show("<%=lblChart_Status.ClientID%>");
    }
    function RequestEnding(sender, eventArgs) {
        if (objLoadingPanel) objLoadingPanel.hide(objUpdatedControl);
        objUpdatedControl = null;
        objLoadingPanel = null;
    }

    However, when I click the "btnRefresh_SpendingStatus" button, I get the following error: "Object doesn't support this property or method".  Am I missing something?  Thanks.
  2. Ryan
    Ryan avatar
    61 posts
    Member since:
    Jul 2009

    Posted 02 Feb 2011 Link to this post

    I've resolved this issue.  I'm now using the following code:

    if (eventArgs.get_postBackElement().id.indexOf("RadDockName") != -1)
        objLoadingPanel.show("<%=RadDockName.ClientID%>");

    Thanks.
Back to Top