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 1bfb74f9b4140429dffab39c65205a2f0326ff2c
parent ec31f7c67a0f864316157172a3ddf4d3ba441b4b
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed,  8 May 2013 19:56:25 +0200

Clean up obsolete 'custom' attributes
Diffstat:
Mlib/form.js | 15+++++----------
1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/lib/form.js b/lib/form.js @@ -1,4 +1,4 @@ -/* 07may13abu +/* 08may13abu * (c) Software Lab. Alexander Burger */ @@ -171,7 +171,8 @@ function post(form, file) { if (txt[i]) setHref(parent, txt[i]); else { - grand = parent.parentNode; + var grand = parent.parentNode; + grand.removeChild(parent); grand.appendChild(fld); } @@ -187,9 +188,7 @@ function post(form, file) { ++i; } else { - if (fld.custom != null) - putCustom(fld.custom, val); - else if (fld.type == "checkbox") { + if (fld.type == "checkbox") { fld.checked = val != ""; document.getElementsByName(fld.name)[0].value = ""; } @@ -223,8 +222,6 @@ function post(form, file) { document.getElementsByName(fld.name)[0].value = "T"; ++i; } - if (fld.custom != null) - ableCustom(fld.custom); } while (i < txt.length && (j = "#*?".indexOf(txt[i].charAt(0))) >= 0) { switch (j) { @@ -283,9 +280,7 @@ function post(form, file) { if (fld.name && fld.type != "submit") { // "image" won't come :-( var val; - if (fld.custom != null) - val = getCustom(fld.custom); - else if (fld.type == "checkbox") + if (fld.type == "checkbox") val = fld.checked? "T" : ""; else if (fld.type == "select-one") val = fld.options[fld.selectedIndex].text;