From 9f4444331a3c06c58c50ea10ab6ad84904c54339 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 7 Aug 2005 07:00:00 +0000 Subject: r9176: added a much neater method of calling printf on the server from client side js. Just use srv_printf() and normal printf arguments (This used to be commit 11c7e8db3d2501a6a439d3e3a63a5055cc577f51) --- swat/scripting/client/call.js | 47 ++++++++++++++++++++++++++++++++-------- swat/scripting/general_calls.esp | 26 ++++++++++++++++++++++ 2 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 swat/scripting/general_calls.esp (limited to 'swat/scripting') diff --git a/swat/scripting/client/call.js b/swat/scripting/client/call.js index d1671ef70f..3af6a5a876 100644 --- a/swat/scripting/client/call.js +++ b/swat/scripting/client/call.js @@ -40,7 +40,7 @@ function __http_object() { /* usage: - server_call(url, func, callback, ...); + vserver_call(url, func, callback, args); 'func' is a function name to call on the server any additional arguments are passed to func() on the server @@ -48,17 +48,17 @@ function __http_object() { The callback() function is called with the returned object. 'callback' may be null. */ -function server_call(url, func, callback) { +function vserver_call(url, func, callback, args) { + var args2 = new Object(); + args2.length = args.length; + var i; + for (i=0;i -- cgit