Javascript SOAP action in sharepoint -


im tyring run basic javascript soap action on content editor web part in sharepoint not work. if take code out of sharepoint runs fine in ie, why be?

<button onclick="dostuff()" type="submit">send</button>    <textarea name="request_data" cols=120 rows=17 > <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/xmlschema">   <soap:body>    <createmodifyrequest>   <username>josephs</username>   <lookupids>     <lookupids>4225</lookupids><!--firepass-->   </lookupids> </createmodifyrequest>  </soap:body> </soap:envelope>   </textarea>    <script language="javascript">     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);  } 


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -