test/server_root/htdocs/test-client.js
author Tony Garnock-Jones <tonyg@lshift.net>
Mon Mar 08 02:33:16 2010 +0000 (6 days ago)
changeset 102 a800c54e7ff3
parent 12c8ff63525c7e
permissions -rw-r--r--
Avoid echoing of the echo command
     1 function log() {
     2     $A(arguments).each(function (arg) {
     3 			   $("testOutput").appendChild
     4 			     (document.createTextNode(JSON.stringify(arg) + "\n"));
     5 		       });
     6 }
     7 
     8 function testMain() {
     9     log("Starting.");
    10     var testService = new JsonRpcService(document.location + "rpc/test", onReady);
    11     function onReady() {
    12 	testService.test_proc("Hello, world!").addCallback(log);
    13     }
    14 }