I have an AJAX function that reloads the current page. Now I don’t want to reload the whole page, is it possible to get for example the innerHTML of div#footer in http.responseText?
What I actually want to do is:
document.getElementById("footer").innerHTML = http.responseText.getElementById("footer");
But of course it’s not possible like that, and I don’t want to rewrite the whole page that for example it only prints out the footer if a GET variable exists..
Any ideas? Thanks!
XMLHttpRequest it and parse it as a string?
there
but if you have any more divs in footer this will grab it until the next div’s end – create a new div after footer’s
</div> e.g.: </div><div id="end"></div>and instead of
do: