WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 xLoadTree: MSXML file protocol bug work around, Ed MacDonald, July 14, 2002
     Re:xMenu: iFrame causes menubar styles to change sporatically, DPK, July 17, 2002

Subject: xLoadTree: MSXML file protocol bug work around From: Ed MacDonald Date: July 14, 2002

I wanted to use the xTree in a server-less, static prototype but had trouble due to the MSXML file protocol bug.  The following small changes work around the problem.

MSXML does manage to read the file in, but doesn't return a responseXML DOM document.  I suspect it's grummpy because it didn't get a mime type in a protocol header.  It will, however, return responseText.  So if we reload the DOM document with the response text, we're good to go.

In _startLoadXmlTree onreadystatechange event handler:
_xmlFileLoaded(xmlHttp, jsNode);
// _xmlFileLoaded(xmlHttp.responseXML, jsNode);

Then:
//function _xmlFileLoaded(oXmlDoc, jsParentNode) {
function _xmlFileLoaded(oXmlHttp, jsParentNode) {
   var oXmlDoc = oXmlHttp.responseXML;         //this has no nodes if file protocol
   oXmlDoc.loadXML(oXmlHttp.responseText);




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