Reputation: 709
I want to build an app using jquery mobile and phonegap. My problem is When I try to load json data using $.ajax() method it works fine in local host but when i try this at live hosting it results nothing. Here is my code.
$.ajax({
type: "GET",
url: "http://rahultest.herobo.com/rbbank/login.php",
crossDomain: true,
data: {id: 'rahul123', pswd:'xxxxx'},
dataType:"json",
success:function(data){
if(data.status=="connected"){
user_id=data.id;
$.mobile.navigate("#menu");
}
else{
alert("User ID and Password is incorrect");
}
},
error: function(){alert("Could not connect");}
});
});
Upvotes: 2
Views: 285