title: Sending two Ajax requests to two different PHP scripts from single javascript function
body: <p>Is it possible to send Ajax requests to two or more Php scripts simultaneously? I know that this can be achieved serially (getting response from 1 and then getting response from the other) but I am wondering is it possible simultaneously. Please assist me with the following code:</p>
  
  <pre><code>function calShowUpload(){
      if (http.readyState == 4) {
          res = http.responseText;
          document.getElementById('maincontent').innerHTML=res;
      }
  }
  
  function showUpload(obj)
  {
        http.open("GET", "./showUpload.php", true);
      http.onreadystatechange = calShowUpload;
      http.send(null);
  }
  
  
  function getXHTTP() {
      var xhttp;
      try {   // The following "try" blocks get the XMLHTTP object for various browsers…
              xhttp = new ActiveXObject("Msxml2.XMLHTTP");
          } 
      catch (e) {
              try {
              xhttp = new ActiveXObject("Microsoft.XMLHTTP");
              } 
          catch (e2) {
           // This block handles Mozilla/Firefox browsers...
                  try {
                      xhttp = new XMLHttpRequest();
                  } 
              catch (e3) {
                      xhttp = false;
                  }
              }
          }
      return xhttp; // Return the XMLHTTP object
  }
  
  var http = getXHTTP(); // This executes when the page first loads.
  </code></pre>
  
  <p>In the above example I know that I can call another function like <code>showUpload(obj)</code> inside <code>calShowUpload()</code> to achieve my objective, but I need something like this:</p>
  
  <pre><code>function showUpload(obj)
  {
        http.open("GET", "./showUpload.php", true);
        http.open("GET", "./showDelete.php", true);
      http.onreadystatechange = calShowUpload;
      http.send(null);
  }
  </code></pre>