The World’s Leading Microsoft .NET Magazine
   
 
timstall

Donate Today!

Search Box

 

Calendar

««Jul 2009»»
SMTWTFS
    12
3
4
567891011
12131415161718
19202122232425
262728293031

My RSS Feeds








Mailing List

Most Popular Tags

                                                           

'__pendingCallbacks[...].async' is null or not an object

posted Monday, 16 October 2006

I was doing so ASP.Net 2.0 callbacks (see an overview here: http://dotnet.sys-con.com/read/192509.htm), and kept getting this error when I did a document.location redirect on the ReceiveCallback JavaScript function.

Microsoft JScript runtime error: '__pendingCallbacks[...].async' is null or not an object

Looks like a flagrant Microsoft bug: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101974

People have different suggestions

What worked for me is the setTimeout. However, I needed to pass a parameter to the variable, so I used a technique like so:

var _gRValue;
function ReceiveCallback(rValue)
{
  _gRValue = rValue;
  window.setTimeout('__ReceiveCallback(_gRValue)',0);
}

function __ReceiveCallback(rValue)
{
  //Do stuff here
} //end of method
 

To handle the nature of setTimeout, I stored the returned data in a member variable.

tags:    

links: digg this    technorati    




1. Ryan Westphal left...
Friday, 10 August 2007 10:12 am :: http://ryantech.spaces.live.com

Thank you! This works great.


2. aleksper left...
Thursday, 4 October 2007 8:41 am

Thanks! This works for me, too. Some EndCallback event handler for ASPxGridView: function(s, e) {

  • if (grid1dirty){

    • grid1dirty= false;

    • window.setTimeout("grid2.PerformCallback('')",0);

  • }

}