Fix synchronous Ajax requests in IE. Reported by bphilippot (Closes #1097)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4990 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-10-17 14:21:07 +00:00
parent ed3221441c
commit faac1f98c9

View File

@@ -306,14 +306,13 @@ OpenLayers.Ajax.Request = OpenLayers.Class(OpenLayers.Ajax.Base, {
this.options.asynchronous);
if (this.options.asynchronous) {
this.transport.onreadystatechange =
OpenLayers.Function.bind(this.onStateChange, this);
setTimeout(OpenLayers.Function.bind(
(function() {this.respondToReadyState(1)}),this), 10
);
}
this.transport.onreadystatechange =
OpenLayers.Function.bind(this.onStateChange, this);
this.setRequestHeaders();
var body = this.options.postBody ? this.options.postBody