title: forcing non-async XMLHttpRequest in mobile safari
body: <p>I have the following code setup on a webpage(private at this time):</p>
  
  <pre><code>function DoRequest(httpReq,url,param){
  
    httpReq.open("POST",url,false);
    httpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    httpReq.send(param);
    httpReq.onreadystatechange = function() {
     if (httpReq.readyState==4) {alert(httpReq.responseText);}
    }
  
    if(httpReq.status==200){
      return httpReq.responseText;
    } else {
      return httpReq.status;
   }
  }
  </code></pre>
  
  <p>When I run a request through this, via firefox, safari, ie 7-9, chrome etc on the pc I get a 200 status and the text back correctly.</p>
  
  <p>When I run this same exact page on my iphone, or ipad, I get a status of 0, response text of nothing, and an alert from that callbackfunction of the correct response text afterword. Which seems like it is not waiting for the request to finish before proceeding through the code for the mobile safari browsers, is there anyway to better force it to wait, or a flag I'm blind to see?</p>
  
  <p>I also only get the onreadystate callback on safari, it doesn't do it in any other browser, I tried removing the function in case that was somehow triggering it to run async instead of of not but no dice there it still runs async despite the 3rd parameter being false.</p>
  
  <p>I also just tried <code>httpRq.open("POST",url);</code> without the 3rd parameter and without the onreadystatechange function and still runs async.</p>
  
  <p>The url is an absolute path.</p>