Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the simplest way you can call a webservice in JavaScript without Ajax or anything else like that?
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/208051/consuming-a-web-service-using-javascript">Consuming a Web service using Javascript</a> </p> </blockquote> <p>Please note that I'm still getting used to JavaScript. Basically I need to write an HTML file that uses Javascript to call a couple of web service methods (from the same server as the HTML file) without using Ajax or probably much of anything else that we'd have to install on there separately. We already have the web service up and running fine, as well as some JS. This needs to work for IE, FF, and Chrome, including for computers that are a couple of years "behind the times". What is a really simple way to do this? Again, I'm still kind of getting my feet wet with JavaScript, so I'm having a hard time following and using some of the examples I've seen. Thanks!</p> <p>EDIT: Here's an example of the kind of thing I've been trying:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Hello World&lt;/title&gt; &lt;script language="JavaScript"&gt; var iCallID; function InitializeService(){ alert("spam"); try { service.useService(&lt;WSDL address&gt;, "HelloWorldService"); } catch (e) { alert(e.message); } alert("spam"); service.HelloWorldService.callService("HelloWorld"); alert("spam"); } function ShowResult(){ alert("spam"); alert(event.result.value); alert("spam"); } &lt;/script&gt; </code></pre> <p> </p> <p>I get "spam", then "Object doesn't support this property or method", then nothing.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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