picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 430d5eebc00b8f94d878fc8e5d37dff6a3212265
parent 80f0eddfff9412d982665401493938ab4d53dd89
Author: Alexander Burger <abu@software-lab.de>
Date:   Tue,  7 May 2013 14:22:32 +0200

JavaScript 'lisp' mechanisms: Asynchronous / synchronous
Diffstat:
Mlib/form.js | 12+++++++-----
Mlib/form.l | 2+-
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/form.js b/lib/form.js @@ -491,16 +491,18 @@ function hintOff(i) { } /*** Lisp calls ***/ -function lisp(url) { +function lisp(form, url) { if (!LispReq) return true; - if (arguments.length > 1) { - url += "?" + arguments[1]; // arguments should be properly encoded - for (var i = 2; i < arguments.length; ++i) + if (arguments.length > 2) { + url += "?" + arguments[2]; // arguments should be properly encoded + for (var i = 3; i < arguments.length; ++i) url += "&" + arguments[i]; } - try {LispReq.open("GET", SesId + "!" + url);} + try {LispReq.open("GET", SesId + "!" + url, form == null);} catch (e) {return true;} + if (form) + LispReq.onload = function() {post(form, null);} try {LispReq.send(null);} catch (e) { LispReq.abort(); diff --git a/lib/form.l b/lib/form.l @@ -285,7 +285,7 @@ (if "*TZO" (tim$ (% (- Tim -86400 @) 86400)) (javascript NIL - "lisp('tzOffs', '+' + (new Date()).getTimezoneOffset());" ) + "lisp(null, 'tzOffs', '+' + (new Date()).getTimezoneOffset());" ) (pack (tim$ (% Tim 86400)) " UTC") ) ) ) ) # Return chart property