title: xhrPost works differently with Firefox and IE8 - but how do I handle the response?
body: <p>I really don't understand why I get a different <strong>response</strong> from xhrPost with Dojo.  For IE8 it works fine and the XML can be read - but in Firefox it works differently and there is no such attribute as "serverResponse.results[0].xml" - see below:</p>
  
  <pre><code>var serverResponse = dojo.xhrPost(xhrArgs);
  serverResponse.results[0].xml
  </code></pre>
  
  <p>like you get in IE8.</p>
  
  <p>Does anyone know how to handle responses properly in Firefox when using xhrPost.
  Cheers.</p>
  
  <pre><code>var message = '&lt;?xml version="1.0" encoding="utf-8"?&gt;' +
                      '&lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;' +
                        '&lt;soap12:Body&gt;' +
                          '&lt;MineSearch xmlns="http://localhost/"&gt;' +
                            '&lt;x&gt;' + inPoint.x + '&lt;/x&gt;' +
                            '&lt;y&gt;' + inPoint.y + '&lt;/y&gt;' +
                            '&lt;buffer&gt;' + buffer + '&lt;/buffer&gt;' +
                          '&lt;/MineSearch&gt;' +
                        '&lt;/soap12:Body&gt;' +
                      '&lt;/soap12:Envelope&gt;';
  
  
  
  
          //The parameters to pass to xhrPost, the message, and the url to send it to
          //Also, how to handle the return and callbacks.
          var xhrArgs = { url: "http://localhost/ApplicationServices.asmx?op=MineSearch",
              postData: message,
              headers: { "Content-Type": "application/soap+xml" },
              handleAs: "xml",
              sync: true,
              load: function(data) {
                  dojo.byId("footer").innerHTML = "Message posted.";
              },
              error: function(error) {
                  dojo.byId("footer").innerHTML = "Message error.";
  
              }
          }
  
          //Call the asynchronous xhrPost
          var serverResponse = dojo.xhrPost(xhrArgs);
          var xmldata = serverResponse.results[0].xml;
          var xmlDoc;
  
          if (window.DOMParser) {
              parser = new DOMParser();
              //Below is wrong somehow and the serverResponse.results[0] is probably wrong too.
              xmlDoc = parser.parseFromString(serverResponse.results[0], "text/xml");
          }
          else // Internet Explorer
          {
              xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
              xmlDoc.async = "false";
              xmlDoc.loadXML(xmldata);
          }
  </code></pre>