I am trying to use dojo.xhrGet to get some json back from a php file. Everything works great in Firefox, but IE doesn’t work at all and Chrome can be hit or miss. The problem is the callback isn’t being executed (in the load argument). I checked the Inspector in Chrome and the request is getting returned with the correct data, readyState of 4 and status of 200, but the callback isn’t executing. Any ideas what could be going wrong? Could this happen because of a scoping issue?
var xhrArgs = {
url : "/phpHelpers/getImages.php",
handleAs : "json",
load : function(result) {
alert('load callback');
},
error : function(error) {
alert('error');
}
};
this.def = dojo.xhrGet(xhrArgs);
I was able to track down the problem… Was all because of this:
I had that included in my main file, for some reason it was hindering the callbacks from firing in both ie and chrome (although Chrome was hit or miss). I not sure why firebug would cause this, but removing the include fixed the issue. Thanks for everyone’s input.