|
<blockquote>I'd like to load an XML/HTML fragment from the server and replace a node in the document by that fragment. That way, I could periodically refresh a specific region of the page.</blockquote>
Use the "responseText" attribute to get at the html as text. Then use "innerHTML" to place it where you want it.
If you don't need HTML, but you're just putting text in, you might also use the simple DOM methods to create a text node, stick it on a paragraph, then put the paragraph where you want it. Put your replaceable text in a div with a unique id so you can find it easily, clean it out and change the text.
|