Who needs childNodes when you have innerHTML?
The Weird and The Wonderful
1
Posts
1
Posters
0
Views
1
Watching
-
We have a webpage that contains a table with collapsible sections. Straightforwardly, the code behind the show/hide links took the approach of (1) searching for the tr elements that need to be toggled, and (2) changing the .style.display property to "" or "none" as appropriate. Less straightforwardly, step #1 was implemented not with DOM methods, but by searching the innerHTML for a string starting with "<TR ID=DISPFILE_". In uppercase, so it wouldn't work on Firefox which normalizes the tag names to lowercase. At least the original programmer was consistent: Step #2 was implement by a similar text search for "STYLE='display: none'".