comparison lib/js/urweb.js @ 1610:37f5a23446b2

Catch more <ccheckbox> events
author Adam Chlipala <adam@chlipala.net>
date Thu, 24 Nov 2011 11:41:52 -0500
parents c6cc104a47ac
children 7d459f223ac2
comparison
equal deleted inserted replaced
1609:c6cc104a47ac 1610:37f5a23446b2
892 892
893 function chk(s) { 893 function chk(s) {
894 var x = input(document.createElement("input"), s, 894 var x = input(document.createElement("input"), s,
895 function(x) { return function(v) { if (x.checked != v) x.checked = v; }; }, "checkbox"); 895 function(x) { return function(v) { if (x.checked != v) x.checked = v; }; }, "checkbox");
896 x.defaultChecked = x.checked = s.data; 896 x.defaultChecked = x.checked = s.data;
897 x.onclick = function() { sv(s, x.checked) }; 897 x.onclick = x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.checked) };
898 898
899 return x; 899 return x;
900 } 900 }
901 901
902 function tbx(s) { 902 function tbx(s) {