SHARE
TWEET

json-wsp client

a guest Oct 18th, 2012 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.         <title>Testing the JSON-WSP Client</title>
  5.         <script src="json2.js" type="text/javascript"></script>
  6.         <script src="jsonwspclient.js" type="text/javascript"></script>
  7.         <script>
  8.  
  9.        
  10.         var client = new JSONWSPClient();
  11.         function load()
  12.         {
  13.                 document.getElementById("demo").innerHTML="Loading...";
  14.                 client.loadDescription("http://localhost/calc/Calculator/jsonwsp/description",function(){
  15.                                                                                                         document.getElementById("demo").innerHTML="LOADED!";
  16.                                                                                                 })
  17.  
  18.         }
  19.         function add()
  20.         {
  21.                 document.getElementById("demo").innerHTML="Adding...";
  22.                
  23.                 client.add({
  24.                         a:10,
  25.                         b:20},
  26.                         null,
  27.                         function(resp) {
  28.                                                 document.getElementById("demo").innerHTML=resp;
  29.                         }
  30.                
  31.                 )
  32.                
  33.         }
  34.         </script>
  35. </head>
  36. <body>
  37. <p> Testing the JSON-WSP client</p>
  38. <button onclick="load()">Load</button>
  39. <button onclick="add()">Add</button>
  40. <p id="demo"></p>
  41. </body>
  42. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top