0

Trying to make a post ajax request and getting the following error:

XMLHttpRequest cannot load xxxxx---No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

I'm new to web development I am passing a session id so I need be authenticated. I know its cross domain, but what should I do to fix it.

$.ajax({
    type: 'POST',
    url:'http://slc.xxx.com:8080/Autocomplete',
    data: {"terms":[{"docId":null,"term":"tig"}],"currentTermIndex":0, "sessionID" : "xxx"},
    success: function(data){
        console.debug('Load was performed.');
     }
 });
Cyclonecode
  • 29,115
  • 11
  • 72
  • 93
  • Try adding `crossdomain:true` to your ajax call. You can also try to add `dataType:jsonp`. – Cyclonecode Jan 25 '14 at 00:24
  • possible duplicate of [Access-Control-Allow-Origin error sending a jQuery Post to Google API's](http://stackoverflow.com/questions/6114436/access-control-allow-origin-error-sending-a-jquery-post-to-google-apis) – Cyclonecode Jan 25 '14 at 00:29

0 Answers0