title: Call and Display REST or SOAP response from a HTML page
body: <p>I am trying to call the webservice to get a simple list of tasks, from a windows 7 gadget.</p>
  
  <p>Now, basically its a html page, with Javascript if need be. Ive looked at <a href="https://stackoverflow.com/questions/124269/simplest-soap-example-using-javascript">Simplest SOAP example</a>, but had no luck. (My button doesnt do anything)</p>
  
  <p>There is a button on my html page.  The procedure would be.</p>
  
  <ol>
  <li><p>Click the button. </p></li>
  <li><p>Sends request to web service.</p></li>
  <li><p>Recieve response from webservice</p></li>
  <li><p>display the response below the button.</p></li>
  </ol>
  
  <p>Any example code, as complete as possible would be much appreciated. Or at worst, some detailed instructions following my 4 steps, and how I achieve it.</p>
  
  <p>Ive never fully understood javascript, but think I did it correctly.
  (Note, it works fine connecting via the URL, to the REST service).</p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt; 
       &lt;script type="text/javascript" src="jquery-1.6.4.min.js"&gt;&lt;/script&gt;
  
       &lt;script&gt;
        function getTasks() {
          $.get("https://localhost/TEST.TestService.svc/rest/Services?CostCentreNo=1&amp;Filter=0",
            function(data){
              alert("Data Loaded: " + data);
            });
      }
      &lt;/script&gt;
     &lt;/head&gt;
     &lt;body&gt;
        &lt;button onclick="javascript:getTasks();"&gt;Show Match&lt;/button&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>