Heyy can somebody help me ?
i have this issue that still do know who to resolve… titanium is show a error that says this “Uncaught ReferenceError: responseText is not defined”, i tried very option but hmmm don’t work.
this is my code
var xhr = Titanium.Network.createHTTPClient();
xhr.onload = function(){
alert("voltou ao js");
var json = JSON.parse(responseText);
var response = JSON.parse(json);
if (response.logged == true)
{
alert("voltou ao js e funca");
}
else
{
alert("-.-");
}
};
button1.addEventListener('click',function(e)
{
var params = box1.values ;
xhr.open("GET","http://10.0.2.2/jobfinder/teste_demo_grafica/Resources/teste.php?");
xhr.send(params);
});
That URL is unresponsive. You should get a web debugging proxy like fiddler or charles so you can see your web traffic.
Also, remove the trailing ? after the address, what is with that?
Also, try doing a “POST” instead of “GET” some servers do not allow that verb.
Also, you will want error handlers in cases like this.