私は Firefox 用の拡張機能を作成していpage-mod
ます。モジュールを使用して、以下を含む JavaScript ファイルを実行しています。
function handleServerResponse() {
if (xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {
//some code
}
else {
alert("Error during AJAX call. Please try again");
}
}
}
var xmlHttp = new XMLHttpRequest();
var txtname = document.getElementById("txtname");
xmlHttp.open("POST","http://localhost:8080/Jelly/GetStuff",true);
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttp.send("url=" + document.URL);
代わりにIPアドレスを使用しても、取得xmlhttp.status==0
し続けます。何か案は?200
localhost