From a2810779352d40911880e84c91f85fe4ccb5d953 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 5 Aug 2005 19:16:49 +0000 Subject: r9135: added a sample page that demonstrates using AJAJ to make remote calls that update an object (This used to be commit 678b0cc08f6026fe35b522d5705ab0c1baf3c359) --- swat/esptest/qooxdoo.esp | 117 +++++++++++++++++++++++++++++++++++++++++++++++ swat/esptest/remote.esp | 19 ++++++++ 2 files changed, 136 insertions(+) create mode 100644 swat/esptest/qooxdoo.esp create mode 100644 swat/esptest/remote.esp diff --git a/swat/esptest/qooxdoo.esp b/swat/esptest/qooxdoo.esp new file mode 100644 index 0000000000..5ab39d807d --- /dev/null +++ b/swat/esptest/qooxdoo.esp @@ -0,0 +1,117 @@ +<% + page_header("columns", "ESP qooxdoo test", "esptest"); + + libinclude("encoder.js"); + + var thispage = request.REQUEST_URI; +%> + + + + +

Samba4 qooxdoo test

+ + + + +
+ +<% page_footer() %> diff --git a/swat/esptest/remote.esp b/swat/esptest/remote.esp new file mode 100644 index 0000000000..c0f12147a8 --- /dev/null +++ b/swat/esptest/remote.esp @@ -0,0 +1,19 @@ +<% +libinclude("server_call.js"); + +/* this is a call that the client js code can make - it just adds + some more elements to the passed object, then returns the object */ +function testfunc(x) { + var sys = sys_init(); + x.nttime = sys.nttime(); + x.timestring = sys.httptime(x.nttime); + return x; +} + +/* register a call for clients to make */ +var call = servCallObj(); +call.add('testfunc', testfunc); + +/* run the function that was asked for */ +call.run(); +%> -- cgit