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 | 6b1c568299c1625ea0f1441268b17aee37930c5c (patch) | |
tree | d3a6bd1e32c51b40e0cc4deb229dc3a21037c1be /lib/js | |
parent | efa6f97eee79311cd06592ed0241acfc40561785 (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"); |