This project has moved. For the latest updates, please go here.

AjaxPro.Request.onTimeout is null for synchronous calls



orip wrote May 14, 2009 at 6:45 PM

The fix: in line 300 of core.js, replace
onTimeout: null,
onTimeout: function() { return true; },

orip wrote May 14, 2009 at 7:29 PM

Also, if your call is a "fire and forget" type (you don't need it to be synchronous), you can add an empty callback function to make it an asynchronous call:
MyClass.MyMethod(param1, param2, function(){});

wrote Jun 10, 2009 at 10:38 PM

wrote Nov 2, 2009 at 8:22 PM

wrote Aug 31, 2010 at 6:45 AM

tonyqus wrote Aug 31, 2010 at 6:46 AM

I have the same issue. Is there any official fix?

wrote Aug 31, 2010 at 12:32 PM

wrote Feb 14, 2013 at 8:11 PM

tanwy83 wrote Mar 18, 2014 at 8:48 AM

I suggest a more proper fix is to clear the timeout whenever it is a synchronous call detected.
I believe this flow is more make sense.
Is there any expert to clarify this?
I suggest to clear the timeout, or call function abort() or call function endRequest().

AjaxPro.Request.prototype = {
invoke: function(method, args, callback, context) {
if (!async) {
        if (this.timeoutTimer != null) clearTimeout(this.timeoutTimer);
        return this.createResponse({error: null,value: null});

    return true;    

wrote Mar 21, 2014 at 12:06 PM