Mercurial > urweb
changeset 1041:0d767c8d2923
Proper initial values of dynamic checkboxes in IE
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 22 Nov 2009 17:57:15 -0500 |
parents | ca5136105c45 |
children | a8a825861397 |
files | lib/js/urweb.js |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/js/urweb.js Sun Nov 22 16:40:09 2009 -0500 +++ b/lib/js/urweb.js Sun Nov 22 17:57:15 2009 -0500 @@ -481,8 +481,8 @@ 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; }