This is a migrated thread and some comments may be shown as answers.

Object Doesn't Support this Property or Method

1 Answer 39 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 31 Jan 2011, 05:29 PM
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.

1 Answer, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 02 Feb 2011, 05:52 PM
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.
Tags
Ajax
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Share this question
or