Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Testing the JSON-WSP Client</title>
- <script src="json2.js" type="text/javascript"></script>
- <script src="jsonwspclient.js" type="text/javascript"></script>
- <script>
- var client = new JSONWSPClient();
- function load()
- {
- document.getElementById("demo").innerHTML="Loading...";
- client.loadDescription("http://localhost/calc/Calculator/jsonwsp/description",function(){
- document.getElementById("demo").innerHTML="LOADED!";
- })
- }
- function add()
- {
- document.getElementById("demo").innerHTML="Adding...";
- client.add({
- a:10,
- b:20},
- null,
- function(resp) {
- document.getElementById("demo").innerHTML=resp;
- }
- )
- }
- </script>
- </head>
- <body>
- <p> Testing the JSON-WSP client</p>
- <button onclick="load()">Load</button>
- <button onclick="add()">Add</button>
- <p id="demo"></p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement