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
commitfc8a2b9a6a95abae0925f3be95bf091b51550338 (patch)
treed3a6bd1e32c51b40e0cc4deb229dc3a21037c1be /lib/js
parent1b7715d8fbe242f8069f2d3ed061f47ec5749fff (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");