# HG changeset patch # User Adam Chlipala # Date 1258930635 18000 # Node ID 0d767c8d29235bdc370eb9dfb6c68438935dae5c # Parent ca5136105c45c745dcc94a978d198dfc54cb1354 Proper initial values of dynamic checkboxes in IE diff -r ca5136105c45 -r 0d767c8d2923 lib/js/urweb.js --- 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; }