my json url is :
http://app.websitename.in/getToken
above url return me following JSON :
{ token: "2cd3e37b-5d61-4070-96d5-3dfce0d0acd9%a00a5e34-b017-4899-8171-299781c48c72" }
Edit: Changed it to
{ "token": "2cd3e37b-5d61-4070-96d5-3dfce0d0acd9%a00a5e34-b017-4899-8171-299781c48c72" }
I am (still) getting Invalid Label error while calling following code
my code is :
$.getJSON("http://app.websitename.in/getToken?callback=?",
function(data) {
alert("success");
alert("Symbol: " + data.token);
});
Please help me
Thanks
No, it isn’t (or, if it is, then its broken).
curl: (6) Couldn’t resolve host ‘app.websitename.in’
If we assume that you mean “example.com” when you say “websitename.in” (use the example domains for examples, that is what they are there for) then:
If it returns that data, in that form, then it is failing to wrap it in a callback, so it is JSON and not JSON-P. You need JSON-P to operate across domains.