Note that there are some explanatory texts on larger screens.

plurals
  1. POfetch xml cross browser compability
    text
    copied!<p>i have function that works in IE and does not work in other browsers please help rewrite it for cross browser compatibility</p> <pre><code>function Fetch(xml) { var Xml = "&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"&gt;"; Xml += GenerateAuthenticationHeader(); Xml += "&lt;soap:Body&gt;"; Xml += "&lt;Fetch xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\"&gt;"; Xml += "&lt;fetchXml&gt;"; Xml += CrmEncodeDecode.CrmXmlEncode(xml); // Microsoft _HtmlEncode function Xml += "&lt;/fetchXml&gt;"; Xml += "&lt;/Fetch&gt;"; Xml += "&lt;/soap:Body&gt;"; Xml += "&lt;/soap:Envelope&gt;"; // Microsot CreateXmlHttp function if ( XMLHttpRequest != null){ var XmlHttp = new XMLHttpRequest(); } else{ var XmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } XmlHttp.open("POST", "/mscrmservices/2007/crmservice.asmx", false); //Sync Request XmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttp.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Fetch"); XmlHttp.send(Xml); var ie = (window.ActiveXObject) ? true : false; var XmlDoc = (ie) ? new ActiveXObject("MSXML2.DOMDocument") : new window.XMLHttpRequest(); XmlDoc.async = false; XmlDoc.resolveExternals = false; XmlDoc.loadXML(XmlHttp.responseXML.text); return XmlDoc; } </code></pre> <p>how to change the code so that it works in google chrome</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload