diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-05-16 16:59:24 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-05-16 16:59:24 -0400 |
commit | 7af142b658900bcc302f3fab1501cc6c33c69e8b (patch) | |
tree | 6ea4055355a578220d315e9e472f5b5a771791e8 /lib/js | |
parent | 3f937354e39cd071de23c72f38e53eb4811ee433 (diff) |
Fix initialization of cselect from source
Diffstat (limited to 'lib/js')
-rw-r--r-- | lib/js/urweb.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 39701b4d..04c1cfae 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -292,11 +292,13 @@ function inp(t, s, content) { populate(x); addNode(x); if (t == "select") { - x.onchange = function() { sv(s, x.value) }; x.innerHTML = content; - sv(s, x.value); - } else + x.value = s.data; + x.onchange = function() { sv(s, x.value) }; + } else { + x.value = s.data; x.onkeyup = function() { sv(s, x.value) }; + } return x; } |