WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 XLoadTree - Dynamic XML not loading , debreynr, October 9, 2003
     Re:XLoadTree - Dynamic XML not loading , Erik Arvidsson, October 9, 2003
         Re:XLoadTree - Dynamic XML not loading , debreynr, November 3, 2003

Subject: Re:XLoadTree - Dynamic XML not loading From: debreynr Date: November 3, 2003

I removed the <?xml.........?> from the file and it worked.\

Thanks Erik!
R

From: Erik Arvidsson
Sent: October 9, 2003
Subject: Re:XLoadTree - Dynamic XML not loading

The problem is that your web server MUST send the correct content type. The correct content type for the content is "text/xml" (not text/html or text/plain).

Therefore there is no problem in XLoadTree (or MSXML) but at the web server

erik

_________________________________

Hi folks
I found the problem why XLoadTree doesn't load dynamically created XML.
The problem is with the Microsoft.XMLHttp. I doesn't seem to load the XML
properly if it's not a static file. My workaround is in xloadtree.js function _startLoadXmlTree
and it goes like this:
function _startLoadXmlTree(sSrc, jsNode) {
if (jsNode.loading &#124;&#124; jsNode.loaded)
return;
jsNode.loading = true;
var xmlHttp = XmlHttp.create();
var xmlHttp = new ActiveXObject("Microsoft.XMLDOM");
xmlHttp.async="false";
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
_xmlFileLoaded(xmlHttp, jsNode);
}
};
xmlHttp.load(sSrc);
}

I think this will only work in IE 5.5 & 6.
Rich





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX