I use easyXDM to make cross-domain POST request and receive a response. When the request reaches a timeout, easyXDM executes the ErrorHandler function twice when I run it on Firefox. On Chrome and IE7 it works fine (i.e. just one execution). Why is that? Any ideas how can I prevent it?
Firefox version 6.0.2
EasyXDM version 2.4.15.118
Hosted on IIS
Example code (this works as described above on my computer, the “Error” alert appears twice on Firefox and once on Chrome and IE7): (obviously, the timeout is set so low so that it would always happen)
<html>
<head>
<script type="text/javascript" src="easyXDM.js"></script>
<script type="text/javascript">
var rpc = new easyXDM.Rpc({
remote: "http://myserver.com/Cors.html"
}, {
remote: {
request: {}
}
});
request = {
url: "http://myserver.com/DoSomething.aspx",
method: "POST",
timeout: 1,
data: {
SomeData: "SomeInformation"
}
};
var responseHandler = function(response) {
alert("Responded");
};
var errorHandler = function(error) {
alert("Error");
};
rpc.request(request, responseHandler, errorHandler);
</script>
</head>
<body>
</body>
This was fixed in https://github.com/oyvindkinsey/easyXDM/commit/c6da9f074606f153769d8be61aca804a02a7acb9
based on the discussion in https://groups.google.com/forum/#!topic/easyxdm/DI470RVe8hk