title: Javascript SOAP action in sharepoint
body: <p>Im tyring to run a basic javascript soap action on a content editor web part in sharepoint but it does not work. If I take the code out of sharepoint it runs fine in IE, why would this be?</p>
  
  <pre><code>&lt;button onclick="doStuff()" type="submit"&gt;Send&lt;/button&gt;
  
    &lt;textarea name="REQUEST_DATA" cols=120 rows=17 &gt;
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;soap:Body&gt;
     &lt;createModifyRequest&gt;
    &lt;username&gt;josephs&lt;/username&gt;
    &lt;lookupIds&gt;
      &lt;lookupIds&gt;4225&lt;/lookupIds&gt;&lt;!--firepass--&gt;
    &lt;/lookupIds&gt;
  &lt;/createModifyRequest&gt;
   &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
    &lt;/textarea&gt;
  
  
  
  &lt;script language="javascript"&gt; 
  
    function doStuff() {
  
  
      var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
  
  
      xmlhttp.open("POST", "http://tpdev-itreq.transpower.co.nz:7777/usr/services/CreateModifyRequest", false);
      xmlhttp.setRequestHeader("SOAPAction", "createModifyRequest");
  
      var userpass = "josephs" + ":" + "pass";
      xmlhttp.setRequestHeader("Authorization", "Basic " + (userpass));
  
      xmlhttp.setRequestHeader("Content-Type", "text/xml");
      xmlhttp.send(REQUEST_DATA.value);
  
  }
  </code></pre>
  
  <p> </p>