projects
/
misc
/
kostenrechnung
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c582bc1
)
Support setting value of checkboxes
author
Joey Schulze
<joey@infodrom.org>
Thu, 25 Feb 2010 16:00:28 +0000
(17:00 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Thu, 25 Feb 2010 16:00:28 +0000
(17:00 +0100)
lib/functions.js
patch
|
blob
|
history
diff --git
a/lib/functions.js
b/lib/functions.js
index
d24efd3
..
274483d
100644
(file)
--- a/
lib/functions.js
+++ b/
lib/functions.js
@@
-34,6
+34,10
@@
function set_value(id, value)
if (!obj) return;
if (obj.nodeName.toLowerCase() == 'input'
+ && obj.type.toLowerCase() == 'checkbox')
+ if (value) obj.checked = true;
+ else obj.checked = false;
+ else if (obj.nodeName.toLowerCase() == 'input'
|| obj.nodeName.toLowerCase() == 'textarea')
obj.value = value;
else if (obj.nodeName.toLowerCase() == 'span')