I am trying to submit an xhr using phonegap on the blackberry. Currently when I make the request it fails silently. I have tried using jQuery jQuery.getJSON(url , callback)
,
an xhr object
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()
, and xui
x$('#home').xhr(url,
{method: 'get',
callback: function(){ alert('made request') }});
and so far I can't get any of them to work. Has anyone else been able to get xhr's to work? I'm using JRE4.6.1 & using eclipse for the development environment. No errors are thrown when I attempt to make the requests, any advice??