title: XHR failed loading: GET
body: <p>I am trying to get some return value from Web Service and i am using ajax jQuery.</p>
  
  <p>I am getting these errors: </p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load 'http....'. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:8181" rel="nofollow noreferrer">http://localhost:8181</a>' is therefore not allowed access</p>
    
    <p>XHR failed loading: GET "http...".</p>
  </blockquote>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script language="text/javascript"&gt;
    getUserValue();
  
    function getUserValue() {
      var number = "0000317930";
      var fullName = "NURULLAH ALTINTAŞ";
      var dataString = "{ 'number' : '" + number + "', 'fullName' : '" + fullName + "'}";
      $.ajax({
        type: "GET",
        url: "http://...",
        data: {
          number: number,
          fullName: fullName
        },
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        dataType: "xml",
        success: OnSuccessGetConnectionArticles,
        failure: OnFailureGetConnectionArticles,
        error: OnErrorGetConnectionArticles
      });
    }
  
    function OnSuccessGetConnectionArticles(response) {
      debugger;
      $.each(response.RestResponse.result, function(index, value) {
        $("#list").append('&lt;li&gt;&lt;span class="tab"&gt;' + value.name + '&lt;/span&gt;&lt;/li&gt;');
      });
    }
  
    function OnErrorGetConnectionArticles(response) {
      debugger;
      alert(response.d);
    }
  
    function OnFailureGetConnectionArticles(response) {
      debugger;
      alert(response.d);
    }
  &lt;/script&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XfkKr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XfkKr.png" alt="enter image description here"></a></p>