0

This is the error that I get when I am trying to hit web service

XMLHttpRequest cannot load http:webservice.com/abc
Origin null is not allowed by Access-Control-Allow-Origin.

statuse is 200 ok

$.ajax({
    url :"http://webservice/Demo.php",
    type: "GET",
    crossDomain : true,
    error:function(response){
        alert("error");
    }, 
    success:function(response){
        alert("success");
    }                     
});
vlio20
  • 8,955
  • 18
  • 95
  • 180
Hamid
  • 129
  • 1
  • 3
  • 9
  • 1
    Well, make sure the proper [CORS headers](https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS) *are* being sent then. – Niels Keurentjes Jun 03 '13 at 07:34
  • try this: http://stackoverflow.com/questions/3595515/xmlhttprequest-error-origin-null-is-not-allowed-by-access-control-allow-origin – vlio20 Jun 03 '13 at 07:34
  • I think it has to do with cross-domain requests which isn't allowed basically. – CaptainCarl Jun 03 '13 at 07:56

0 Answers0