I have a page which I'm trying to add ajax functionality to however I'm
having some difficulties.
Basically I have a section of my page that looks like this
<div id="pageDiv">
<!--a random amount of html could be several nodes of different
kinds-->
</div>
asynchronously my server returns
<document>
<pageDiv>
<!-- some random amount of HTML different than the original -->
</pageDiv>
</document
to sum up what I'm doing now when i get the callback is
div = document.getElementById("pageDiv");
repl = response.responseXML.getElementsByTagName("pageDiv ")[0];
div.replaceChild(repl, div);
which will give me
<div id="pageDiv">
<pageDiv>
<!-- some random amount of HTML different than the original -->
</pageDiv>
</div>
It seems simple but I'm unable to figure out how to get the childNodes
of <pageDivinto my other div. Any ideas of a better way to do this.