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 7:45 PM

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

orip wrote May 14, 2009 at 8: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 11:38 PM

wrote Nov 2, 2009 at 9:22 PM

wrote Aug 31, 2010 at 7:45 AM

tonyqus wrote Aug 31, 2010 at 7:46 AM

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

wrote Aug 31, 2010 at 1:32 PM

wrote Feb 14, 2013 at 9:11 PM

tanwy83 wrote Mar 18, 2014 at 9: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 1:06 PM