hi i am developing a cordova 2.7.0 phonegap application .i am posting restaurant id to web controller in order to get details of that restaurant.backend is in zend framework but response is calling error functio,the error showing-json parse error and unexpected token < .i am totally confused .please help me.
thing i have already tried: iwhen i change url it changes error name,so error can be in url,i am not sure if it is a cross domain issue.
this is my code
function somefunction()
{
alert("called");
var resid = sessionStorage.getItem("ids");
alert(resid);
$.ajax({
url : 'http://app.mywebsitename.com/takeaway/detail',
cache : false,
type : 'GET',
dataType : 'json',
crossDomain : true,
success : function getRestaurantSuccess(data, status) {
alert("success"); },
error : function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
alert(errorThrown);
}
});
}