title: 200/'parsererror' with jquery on ajax post to a https
body: <p>I've read loads of other questions about this argument, but none could solve my problem.
  I make a call to a php page in this way.</p>
  
  <pre><code>$.ajax({
          url: 'https://mydomain/page.php',
          type: "POST",
          data: { 
              "arg1": arg1,
              "arg2": arg2
          },
          success: function(data, textStatus, xhr) {
              //do stuff
          },
          error: function(xhr, textStatus) {
              alert("doLogin\n- readyState: "+xhr.readyState+"\n- status: "+xhr.status);
          }
      });
  </code></pre>
  
  <p>Now, if I put this stuff on the same server as the php it works fine. Troubles start when I launch it from localhost.
  In that case I receive the following in the xhr:
  <code>readyState=0, status=0, statusText="error"</code>.
  Reading some answers on the topic it seems to be because of a same-origin restriction, so I added a few parameters to the call. notably:</p>
  
  <pre><code>   dataType:"jsonp",
     crossDomain: true,
  </code></pre>
  
  <p>Apparently this works better, cause now I receive <code>readyState=4, status=200, statusText="success"</code>. Trouble is, <code>textStatus="parsererror"</code>. I also tried other things as <code>jsonpCallback</code>, <code>cache</code>, <code>async</code>, <code>jsonp</code> in many configurations with no luck.</p>
  
  <p>Now, I receive no data back, cause this call will only give me a cookie that I need.</p>
  
  <p>My question is: am I doing things correctly, for starters? In both cases, what is the reason of such an error? Does the fact that I call a 'https'/POST change something, rather than a plain http/GET?</p>
  
  <p>Second question is, later on I will have to call some webservices through soap requests, which will return data in xml. Will using this same technique work (assuming jQuery doc is fine and I can write <code>dataType:"jsonp xml"</code> to have it converted on the fly (and assuming it is the right technique as well))? I assume it won't be, as jsonp expects something on the line of <code>callbackFN({...})</code> rather than an xml, right?</p>
  
  <p>If none of this is correct, what would the correct way to proceed be? I can't touch the server, thus I am limited to client side.</p>