WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 XML + Tabs = CRASH!, debreynr, July 20, 2004

Subject: XML + Tabs = CRASH! From: debreynr Date: July 20, 2004

Hi All,

I've taken the tab system and played with it a bit. I've added onto each tabpage a DIV into which I dynamically load content from the server using the XML components from the XLoadTree. I query the server and then load it into the DIV. All fine and dandy. But, if I click anywhere on the page within a couple of seconds that it's loaded, it pumps up the CPU usage to 100%. I've tried it on a friends machine and it does the same. This is with IE 6 SP1 on XP.

Here's the code that loads it into the DIV.

function loadMyPage(){
 var xmlHttp = XmlHttp.create();
 xmlHttp.open("GET", "../utils/retrieveXML.asp?ID="+currID+"&load="+document.getElementById("tabPage"+tp.getSelectedIndex()).datable+"&SUFFIX="+currView, true); // async
 xmlHttp.onreadystatechange = function () {
  if (xmlHttp.readyState == 4) {
   if(parseFloat(xmlHttp.responseXML.xml.length)>0){
    document.getElementById("F_"+tp.getSelectedIndex()).innerHTML = xmlHttp.responseXML.xml;
    endTime = new Date();
    document.getElementById("msgAfter").innerHTML=((fNum(xmlHttp.responseXML.xml.length))+" kilobytes took "+(endTime-startTime)/1000+" seconds to load.");
   }else{document.getElementById("F_"+currTab).innerHTML = errorMsg;}
   xmlHttp = null;
  }
 };
 window.setTimeout(function (){
  try{xmlHttp.send(null);}
  catch(er){alert("Internal communications error occurred.\nPlease give the current page time to load before proceeding to the next.\n\nPlease try again.")}
  }, 30);
}

It doesn't happen immediately. It takes about five to ten times of changing the tabs and then clicking immediately. I've gone as far as changing the doctype. Nada....

On another topic, I came across extremely strange behaviour in IE. For some reason, a color caused an ASP page to be processed twice. After changing this color (can't remember the spec), the page behaviour went back to normal and didn't insert two records. Anybody experience something similar?

Richard




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