title: AJAX call to hit a URL
body: <p>I need to hit a page using an AJAX call</p>
  
  <pre><code>$.ajax({
      url: '/path/addId?type=one&amp;id=' + $("#id").val(),
      type: "POST",
      success: function(data){
        alert(data[message]);
      },
      error: function(data){
        alert("error!");
      }
  });
  </code></pre>
  
  <p>I'm getting an error for this. What is the basic configuration required to hit external URL?</p>
  
  <p>UPDATE:</p>
  
  <p>Here's the response I'm getting or error:</p>
  
  <pre><code>readyState
  getResponseHeader
  getAllResponseHeaders
  setRequestHeader
  overrideMimeType
  statusCode
  abort
  state
  always
  then
  promise
  pipe
  done
  fail
  progress
  complete
  success
  error
  respondedText
  status
  statusText
  </code></pre>