title: Sending json using native javascript
body: <p>I want to use native javascript to send a json to php file. Why my $_POST from get-translation.php is empty?</p>
  
  <pre><code>var xmlhttp;
  json_data = JSON.stringify(a_data);
  
  if (window.XMLHttpRequest)
  {
       xmlhttp=new XMLHttpRequest();
  }
  else
  {
       xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  
  xmlhttp.open("POST","get-translation.php",true);
  xmlhttp.setRequestHeader("Content-type","application/json");
  
  xmlhttp.send(json_data); // json_data is simple json
  </code></pre>