title: XDomainRequest object caching/asynchronous call issue
body: <p>I have an aspx page on which I am using XDomainRequest object to populate two div(s) with html returned from AJAX response.<br>
  I have used Jquery to get the divs and perform "each()" on the retrieved List</p>
  
  <pre><code>var divs = $("div");
  divs.each(function(index) {
      if (window.XDomainRequest) {
          xdr = new XDomainRequest();
          if (xdr) {
              xdr.onload = function() {
                  alert("XDR Response - " + xdr.responseText);
                  var currentDivID = divs[index].attributes["id"].value;
                  var selectedDiv = $("div[id='" + currentDivID + "']");
                  if (xdr.responseText == '') selectedDiv.attr("style", "display:none;");
                  else selectedDiv.append(xdr.responseText);
              };
              xdr.open("GET", xdrUrl);
              try {
                  xdr.send();
              } catch (e) {
                  alert(e);
              }
          } else {
              alert('Create XDR failed.');
          }
      } else {
          alert('XDR not found on window object .');
      }
  }
  </code></pre>
  
  <p>Now, whats happening is , i have two Divs on a page that have different IDs and when this code runs on "$.ready(function(){})" , both requests are asynchronously sent to the server and processed   </p>
  
  <p>the result is<br>
   1. sometimes the onload get the response for the second div in both div results.<br>
   2. IE sents only one request to the server(I am using fiddler to see what requests are sent to server).   </p>
  
  <p>Can anybody guide me whats wrong with the code ? As far as I know XDR does not support synchronous calls, and asynchronous calls are giving me wrong results. Any workaround/tip for this problem.  </p>