Security issue

Feb 10, 2011 at 8:52 AM
when trying to execute""), the response is returned from server (as checked in Fiddler), but xhr.getAllResponseHeaders() returns null and throws exception. 
Is it because of "Same Origin Policy"? Can you please suggest how to resolve the issue?

Feb 10, 2011 at 8:44 PM supports JSONP, which you can access if your page is served from a different domain.

The big doc page discusses this, and I encourage you to go through the section, but in short, you should be able to read from this domain by adding this before the read request.

OData.defaultHttpClient.enableJsonpCallback = true;

Please let me know how this goes and if you run into any other problems.


Feb 11, 2011 at 7:13 AM

Thanks. The issue is resolved."", function (data, request) { 

var html = ""; for (var i = 0; i < data.results.length; i++) {                    

html += "<div>" + data.results[i].Name + "</div>";}  




And if the dataVersion is 1.0 (in the HTTP Header), then the response data is returned in "data.results" variable and if dataVersion is 2.0, the response data is in "data" variable as in documentation example.