title: How to send HttpRequest, and it returns Json data and display it
body: <p>I got very confused on getting Json data. Please correct me if anything does wrong. Below is 
  my code:</p>
  
  <pre><code>var xmlhttp;
  if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
  }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
      {
          var data = JSON.parse(xmlhttp.responseText);
      document.getElementById("getListings").innerHTML=data;
      }
  }
  xmlhttp.open("GET","https://getJsonData",true);
  xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  request.setRequestHeader("Accept", "application/json; charset=utf-8");
  xmlhttp.setRequestHeader("Accept-Datetime","Fri, 15 Feb 2013 00:00:00 GMT");
  xmlhttp.setRequestHeader("Authorization","XXXXXXX");
  xmlhttp.send();
  </code></pre>
  
  <p>I could not get anything displayed on "getListings" div.</p>