Using a WebService with DHTML and Javascript

Michael Schwarz on Sunday, March 30, 2003

I have been asked several times how to use a WebService in a DHTML application on the internet using Scripting. Ok, I have created a small sample using Javascript and Microsoft.XMLDOM ActiveX objects (you have to use Internet Explorer 5 or higher)."POST", "[http://localhost/mymethod.asmx](http://localhost/mymethod.asmx)", true);
XmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
XmlHttp.setRequestHeader("SOAPAction", "[](");
XmlHttp.onreadystatechange = 
new Function("try{if(XmlHttp.readystate==4){

Download the complete script form [1].

(Ok, this is my first Weblog,...!)