0

Using this code

$.getJSON("http://mydomain.com/getcustomers?callback=?",function(data) { .... }).error(function(err){ .... }) 

I'm getting

jQuery16103492487950357067_1336742910384 was not called

I searched on google and some people points to a incompatibility with jquery validate, I'm not using that plugin on this page. I also tried to replace the $.getJSON call by a $.ajax call in order to have more control but the result is the same.

Anyone knows what is causing this?

1 Answer 1

1

Does the service where GetCustomers method lives really support JSON-P? You should be able to see the responses in Fiddler.

You can install Fiddler. Download it from www.fiddler2.com. In case of JSON-P, the JSON-part is wrapped by a function call.

Your response will look like this:

enter image description here

Basically, it is a hack in order to get around the same-origin policy, but since parties such as Google are using it heavily as well, you can "safely" use it. What is returned by the server is actually a javascript function.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.