diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-09-15 16:06:12 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-09-15 16:06:12 -0400 |
commit | fc8a2b9a6a95abae0925f3be95bf091b51550338 (patch) | |
tree | d3a6bd1e32c51b40e0cc4deb229dc3a21037c1be /lib/js | |
parent | 1b7715d8fbe242f8069f2d3ed061f47ec5749fff (diff) |
Filters displaying awfully
Diffstat (limited to 'lib/js')
-rw-r--r-- | lib/js/urweb.js | 20 |
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"); |