I have a JSONP , I read go through some of the web , it said JSONP require a token , so i add product in front of my JSON , and i not sure is this a correct JSONP. correct if this format is wrong.
I am using json_encode this php funCtion to get this JSON string
product[{"Product_ID":"1","Product_Name":"Apple","Product_Description":"New","Product_Image":"http:\/\/www.abc.sda.jpg"},{"Product_ID":"2","Product_Name":"Microsoft","Product_Description":"Microsoft","Product_Image":"Microsoft"}]
My Ajax is as follow
$.ajax({url: "http://www.someweb.com/testing.php",
dataType: "jsonp",
async: true,
success: function (result) {
alert("Success");
},
error: function (request,error) {
alert('Network error has occurred please try again!');
}
});
With this call i am getting the error "unexpected token" , How do I pass in my token which is "product" so that i am able to retrieve my data?