11-28-2011 04:10 AM
hello guys,
am creation an application for blackberry using phonegap.
In my code i use this code to get data from server:
var url = "http://......." // here goes my url
var xhr = new XMLHttpRequest(url);
xhr.open("POST", url, true);
xhr.setRequestHeader("Authorization","************
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if (xhr.readyState == xhr.DONE) {
alert(xhr.status);
alert(xhr.response);
if (xhr.status == 200) {
alert("conn sucess");
}
else {
alert("conn err");
}
}
}
xhr.send("UID=" + nid);
my problem is that the code works fine on bb phones with OS version 6 or above, while with the lower versions the xhr.status = 500 and xhr.responseText returns "could not select proper transport descriptor error"
does anyone know how to solve this problem??
regards,
ykuoles
11-28-2011 11:18 AM
See if this solution helping you.
button below the post(s)