summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-11-22 17:57:15 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-11-22 17:57:15 -0500
commitcf3fc72603a3ad499f2c3177beee709b3a5c53f8 (patch)
tree0804f776b71871a810024ffae771ab51637851bf
parent316635920fc408c3869b239cabf60db7e079930c (diff)
Proper initial values of dynamic checkboxes in IE
-rw-r--r--lib/js/urweb.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 4ee7be4b..c37ff07d 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -481,8 +481,8 @@ function sel(s, content) {
function chk(s) {
var x = input(document.createElement("input"), s,
function(x) { return function(v) { if (x.checked != v) x.checked = v; }; }, "checkbox");
- x.checked = s.data;
- x.onchange = function() { sv(s, x.checked) };
+ x.defaultChecked = x.checked = s.data;
+ x.onclick = function() { sv(s, x.checked) };
return x;
}