javascript - calling a webservice error -


I am trying to follow this tutorial and learn to call web service from a web page. However, I'm getting an error in the Firebug console:

The service has not been defined InitializeService () onload () event = load service.useService ("http: //tm.a ..smx? WSDL "," TryggMedisinWebService ");

This is the relevant code I'm using.

  & lt; Script language = "javascript" & gt; Function InitializeService () {service.useService ("http://tm.arnett.no/tryggmedisinwebservice/tryggmedisinwebservice.asmx?WSDL", "TryggMedisinWebService"); } Var spm, category, fylke; SendQuestion function () {spm = document.send_question.spm.value; Class = documentation. Fylke = document.send_question.fylke.value; Service. TriggeMedicine WebService Service ("send-query", SPM, category, file); } ShowResult () {Warning (event.result.value); } & Lt; / Script & gt; & Lt; Body onload = "initializeService ()" id = "service" style = "behavior: url (& lt ;? php bloginfo ('template_directory') ;? & gt; /webservice.htc)" onresult = "ShowResult ()" & Lt ;; Php body_class (); ? & Gt; & Gt;        

Text "itemprop =" text ">

This . Htc is using the file and as far as I know that it is only supported by IE browser.

To make it work in other browsers, switch to simple AJAX use - For example, jQuery provides excellent interface.

Here's a good article on how to use the Web service:
Examining it individually Have not been tested, but have I seen that information right and at the point.

Comments