summaryrefslogtreecommitdiff
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-09-15 16:06:12 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-09-15 16:06:12 -0400
commit6b1c568299c1625ea0f1441268b17aee37930c5c (patch)
treed3a6bd1e32c51b40e0cc4deb229dc3a21037c1be /lib/js
parentefa6f97eee79311cd06592ed0241acfc40561785 (diff)
Filters displaying awfully
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 19d549c2..a1179231 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -306,14 +306,18 @@ function dyn(pnode, s) {
var arr = dummy.getElementsByTagName("tbody");
firstChild = null;
- if (arr.length > 0 && table != null) {
- var tbody = arr[0], next;
- firstChild = document.createElement("script");
- table.insertBefore(firstChild, x);
- for (var node = tbody.firstChild; node; node = next) {
- next = node.nextSibling;
- table.insertBefore(node, x);
- }
+ var tbody;
+ if (arr.length > 0 && table != null)
+ tbody = arr[0];
+ else
+ tbody = dummy;
+
+ var next;
+ firstChild = document.createElement("script");
+ table.insertBefore(firstChild, x);
+ for (var node = tbody.firstChild; node; node = next) {
+ next = node.nextSibling;
+ table.insertBefore(node, x);
}
} else if (pnode == "tr") {
var dummy = document.createElement("body");