I am encountering a similar situation to XMLHttpRequest status 0 (responseText is empty), but I felt that the difference was strong enough that it deserved it's own question.
So, my HTTPXmlRequest looks like this:
function displayIndicator() {
alert(loader.responseText);
}
var loader = new XMLHttpRequest();
loader.onload = displayIndicator();
loader.open("get", "/products", true);
loader.send();
and /products
when loaded in a browser window, or via
curl http://localhost:3000/cart/indicator;
returns a full fledged html document, (Im using it as a test page for the moment, eventually the end point will change but the correct endpoint behaves the same way).
this page is being served by a node server, so it's using a router and /products
should resolve correctly wherever the script is being called from which makes me suspect that it's not the usual cross-domain issue.
Any thoughts?