I am trying to get data from another port on the same domain but it's not firing the SUCCESS callback function. Instead, the error callback is fired, but there doesn't seem to be an obvious error.
$.ajax({
url: 'http://xxxx:8080/myJSONdata.php',
data: { id: xxx, more: xxx },
dataType: 'json',
success: function(json){ alert( json ); },
error: function(err){console.log(err);}
});
Here's the confusing thing. If I look at the console.log at the err object, I see:
status: 200
responseText: (I get the value I am expecting)
statusTEXT: "OK"
I'm able to access everything, and I've allowed for cross-domain origination in my .htaccess file. So everything should work. I've tried this with $.getJSON as well.
The json data itself is generated by a php file sending headers indicating application/json.
Does anyone know why this is firing off the ERROR callback instead of the SUCCESS callback? It seems so opposite. Thanks ahead.