WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 UI Update function in xloadtree.js, Micha Schopman, October 13, 2003
     Re:UI Update function in xloadtree.js, Micha Schopman, October 15, 2003
         Re:UI Update function in xloadtree.js, Erik Arvidsson, October 17, 2003

Subject: Re:UI Update function in xloadtree.js From: Micha Schopman Date: October 15, 2003

I solved this one.

The browser ate up my cpy cycles while parsing the xml file, not when reading it.

However I have not come up with a case where that xmlHTTP.send command should be activated. Where is it for?

From: Micha Schopman
Sent: October 13, 2003
Subject: Re:UI Update function in xloadtree.js

I ripped a piece of code from xloadtree.js, but my browser hangs while reading a large xml file.

I guessed the xmlHttp.send(null); would take care of this, but maybe I am doing something wrong. I would like to keep my browser reacting while loading the xml file.

// creates the xmlhttp object and starts the load of the xml document
function _startLoadXmlTree(sSrc, jsNode) {
 if (jsNode.loading || jsNode.loaded)
  return;
 jsNode.loading = true;
 var xmlHttp = XmlHttp.create();
 var async = true;
 xmlHttp.open("GET", sSrc, async); // async

 xmlHttp.onreadystatechange = function () {
  if (xmlHttp.readyState == 4) {
   
   if(oXmlDoc == null || oXmlDoc.documentElement == null){
    var oXmlDoc = xmlHttp.responseXML
    oXmlDoc.loadXML(xmlHttp.responseText);
   }
      
   //_xmlFileLoaded(xmlHttp.responseText, jsNode);
   _xmlFileLoaded(xmlHttp.responseXML, jsNode);
  }
 };
 // call in new thread to allow ui to update
 window.setTimeout(function () {
  xmlHttp.send(null);
 }, 10);
}





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