Sign In/My Account | View Cart  
advertisement

Article:
 Very Dynamic Web Interfaces
Subject: Problem
Date: 2005-03-24 14:35:49
From: Goonie

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.


Here is what I'm doing in the readyStateChange handler:


e = document.getElementById('fragment');
e.parentNode.replaceChild(req.responseXML.firstChild, e);


Unfortunately, an XML fragment that is fetched via XMLHttpRequest is not accepted as valid HTML by Gecko/Firefox: It only shows up as text-only, without any formatting. What's worse, getElementById() does not locate my fragment after it has been replaced once.


Is it possible to convert an XML node to an HTML element/node before insertion into the DOM?


Are there any good books on the matter that go well beyond this article?


Regards,


Andreas


Previous Message Previous Message   Next Message Next Message


Full Text Titles Only Newest First
  • Problem
    2005-04-07 23:21:31 rkhlin
  • Problem
    2005-04-06 23:00:56 mdchaney

Sponsored By: