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 c6f40afa3bc7407af469f37907a23cb53dd58ceb
parent b2f68d82a8925ff829ebd315fcef55e598cd157d
Author: Alexander Burger <abu@software-lab.de>
Date:   Thu, 17 Jan 2013 10:39:59 +0100

Clean up
Diffstat:
Mlib/form.js | 22++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/lib/form.js b/lib/form.js @@ -1,24 +1,18 @@ -/* 28dec12abu +/* 17jan13abu * (c) Software Lab. Alexander Burger */ -var FormReq = false; -var HintReq = false; -var LispReq = false; -var Hint, Hints, Item, Beg, End; +var FormReq = new XMLHttpRequest(); +var HintReq = new XMLHttpRequest(); +var LispReq = new XMLHttpRequest(); -try { - FormReq = new XMLHttpRequest(); - HintReq = new XMLHttpRequest(); - LispReq = new XMLHttpRequest(); - FormReq.upload.addEventListener("progress", dropProgress, false); - FormReq.upload.addEventListener("load", dropLoad, false); -} -catch (e) {} +FormReq.upload.addEventListener("progress", dropProgress, false); +FormReq.upload.addEventListener("load", dropLoad, false); var Queue = new Array(); var Btn = new Array(); var Key, InBtn, Auto, Drop; +var Hint, Hints, Item, Beg, End; function inBtn(flg) {InBtn = flg;} @@ -247,7 +241,7 @@ function post(form, file) { if (Btn[i].form != form) ++i; else { - data += (data? "&":"") + Btn[i].name + "=" + encodeURIComponent(Btn[i].type == "submit"? Btn[i].value : Btn[i].src); + data += "&" + Btn[i].name + "=" + encodeURIComponent(Btn[i].type == "submit"? Btn[i].value : Btn[i].src); Btn.splice(i,1); } for (i = 0; i < form.elements.length; ++i) {