I worked on various examples demonstrating cross-domain scripts, and came across a situation where I wanted to use jQuery.support.cors = true along with an Ajax call to retrieve data from a web service. I have an example of working webservice using jsonp , which I thought would just add jQuery.support.cors = true, change the dataType type to "json" and delete & $ callback =? from url. I see an answer coming back from webservice (Netflix) with the expected data, but when the ajax call returns, it serves as an error, not a success.
Initially, I thought that perhaps the web service does not have the appropriate headers, but I would be inclined to think that the received formatted response would correspond to the existing header. Maybe I am not formatting the success / error function correctly and the Ajax result is not like.
Here is a script where it tries to use jQuery.support.cors to no avail.
source
share