summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 16:59:24 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 16:59:24 -0400
commit817ce7421f990d3ee5ed75ebdc0560a22b96837f (patch)
tree6ea4055355a578220d315e9e472f5b5a771791e8
parente7b72f5d56b96a830e0272cb034ed60da38ea909 (diff)
Fix initialization of cselect from source
-rw-r--r--lib/js/urweb.js8
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;
}