블랙 베리에 phonegap을 사용하여 xhr을 제출하려고합니다. 현재 요청을하면 자동으로 실패합니다. 내가 jQuery를 jQuery.getJSON(url , callback)
,xhr과 블랙 베리에 phonegap이 있음
XHR 객체
var xmlhttp = new XMLHttpRequest();
//callback function when XMLHttpRequest is ready
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){
if(xmlhttpForTGT.status==200){
response = xmlhttpForTGT.getResponseText()
}
else{
alert("Request Failed")
}
}
}
xmlhttp.open("GET", url , true)
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
xmlhttp.send()
를 사용했는데, 개 개별
x$('#home').xhr(url,
{method: 'get',
callback: function(){ alert('made request') }});
을 지금까지 나는 그들 중 하나가 동작하지 않습니다 수 있습니다. 다른 사람이 xhr을 작동시킬 수 있었습니까? 나는 개발 환경을 위해 Eclipse를 사용하여 JRE4.6.1 &을 사용하고있다. 요청을 할 때 아무런 오류도 발생하지 않습니다.
너도 알다시피 - 나는 똑같은 문제가있다! – Olaseni