Possible Duplicate:
getElementsByClassName returns [] instead of asynchronous appended node
I face the following problem:
<div class="testA" id="test1">
<div class="colorSelector" id="0-0">
<div class="gbSelector" id="1-0">
<table style="none" id="2-0"></table>
</div>
</div>
</div>
The above written Tree is predefined. I now load a node tree via XMLHttpRequest & Co. that I append into the <div class="testA" id="test1">
When I now try to get the Element <div class="colorSelector" id="0-0">
using getElementById("0-0") I get the expected result. But using getElementsByClassName("colorSelector") returns [].
Did I miss something? Is it probably a leftover of the fact the nodes were of type Element and not HTMLElement?
I don't get it.
EDIT: I used the comments to visualize that the nodes are added later when processing the response
EDIT 2: http://lls-test.de/JS-Library/index.php is what I receive as a response and handle in a script to append the first DIV inside the response tag