__pendingCallbacks javascript error

mihaelaro

New Member
I have created a web application that uses the Microsoft Ajax libraries and callbacks. When I run the code locally on my Windows 7 Machine x64 running IIS 7.5 the following javascript is generated in the axd javascript file:\[code\]function WebForm_CallbackComplete() { for (var i = 0; i < __pendingCallbacks.length; i++) { callbackObject = __pendingCallbacks; if (callbackObject && callbackObject.xmlRequest && (callbackObject.xmlRequest.readyState == 4)) { if (!__pendingCallbacks.async) { __synchronousCallBackIndex = -1; } __pendingCallbacks = null; var callbackFrameID = "__CALLBACKFRAME" + i; var xmlRequestFrame = document.getElementById(callbackFrameID); if (xmlRequestFrame) { xmlRequestFrame.parentNode.removeChild(xmlRequestFrame); } WebForm_ExecuteCallback(callbackObject); } }}\[/code\]When the same application using the exact same files runs on a Windows Server 2003 32bit machine with IIS 6 the following code is generated in the .axd javascript file:\[code\]function WebForm_CallbackComplete() { for (var i = 0; i < __pendingCallbacks.length; i++) { callbackObject = __pendingCallbacks; if (callbackObject && callbackObject.xmlRequest && (callbackObject.xmlRequest.readyState == 4)) { WebForm_ExecuteCallback(callbackObject); if (!__pendingCallbacks.async) { __synchronousCallBackIndex = -1; } __pendingCallbacks = null; var callbackFrameID = "__CALLBACKFRAME" + i; var xmlRequestFrame = document.getElementById(callbackFrameID); if (xmlRequestFrame) { xmlRequestFrame.parentNode.removeChild(xmlRequestFrame); } } }}\[/code\]The location of the call to WebForm_ExecuteCallback is different. In the latter code sample it throws an error (a common problem if you search for it on the ol' interweb) when a callback is performed during an already executing callback. The former does not throw the error.I am aware of how to work around the problem, my question is does anyone know why the code is generated differently between the two environments? Is it a 32vs64 issue? An IIS6 vs 7 issue? Etc....?
 
Top