X
xcampanoli
When I uncomment either of the http urls below instead of the local
file, I always get a readyStatus of zero, and I never get past trace 2
alert. When I use the local file I get readyStatus 1 and get to trace
3 just fine:
alert("xhr = " + xhr);
xhr.onreadystatechange = parseHttpResponse;
alert("trace 1:" + xhr.status + ", readyState: " +
xhr.readyState);
try {
//xhr.open("GET", "http://www.eskimo.com", true);
//xhr.open("GET", "http://joehill/index.html", true);
xhr.open("GET", "file:///home/xeno/study/read000.html",
true);
} catch(e) {
alert("trace 1a:" + xhr.status + ", readyState: " +
xhr.readyState);
};
alert("trace 2:" + xhr.status + ", readyState: " +
xhr.readyState);
xhr.send(null);
alert("trace 3:" + xhr.status + ", readyState: " +
xhr.readyState);
----snip----
I think I'm supposed to be able to do this, but as I say above it
doesn't go. I wonder if there's an extra setting here I missed, or if
I need to specify a UserAgent or configure my web server daemon
somehow differently. Please I am stuck. I need feedback or
especially references.
file, I always get a readyStatus of zero, and I never get past trace 2
alert. When I use the local file I get readyStatus 1 and get to trace
3 just fine:
alert("xhr = " + xhr);
xhr.onreadystatechange = parseHttpResponse;
alert("trace 1:" + xhr.status + ", readyState: " +
xhr.readyState);
try {
//xhr.open("GET", "http://www.eskimo.com", true);
//xhr.open("GET", "http://joehill/index.html", true);
xhr.open("GET", "file:///home/xeno/study/read000.html",
true);
} catch(e) {
alert("trace 1a:" + xhr.status + ", readyState: " +
xhr.readyState);
};
alert("trace 2:" + xhr.status + ", readyState: " +
xhr.readyState);
xhr.send(null);
alert("trace 3:" + xhr.status + ", readyState: " +
xhr.readyState);
----snip----
I think I'm supposed to be able to do this, but as I say above it
doesn't go. I wonder if there's an extra setting here I missed, or if
I need to specify a UserAgent or configure my web server daemon
somehow differently. Please I am stuck. I need feedback or
especially references.