Hi again!
I made a client code which fatches an xml file from a server.
The client code looks like:
The testXML.asp file returns valid XML file with contentType set to "text/xml".
Most of the time it works fine, but from time to time (i found no pattern) IE hangs.
The hang occurs before actual drawing of table (drawNodes, appendChild) or in the middle of appending the table (appendChild).
The hang lasts from few minutes to infinity. If the hang timeouts, no call to above function work any more.
The hang occurs unexpectedly retrieving same XML.
Any ideas?
Tomi
Tomi Hrovatin
I made a client code which fatches an xml file from a server.
The client code looks like:
Code:
function onButtonClick() {
http = new ActiveXObject( 'Msxml2.XMLHTTP' );
http.open( 'GET', "[URL unfurl="true"]http://myserver.com/testXML.asp",[/URL] true );
http.onreadystatechange = function() {
if( http.readyState == 4 ) {
var doc = http.responseXML;
doc.setProperty( 'SelectionLanguage', 'XPath' );
var root = doc.selectSingleNode( "//root/table" );
//get all subnodes
var oNodes = doc.selectNodes( "//root/table/*");
// create an instance of table
var oTable = HTMLTable();
//draw TRs and TDs to a table
drawNodes(oNodes, oTable, doc); //this function creates a table from xml data
//append table to existing DIV on page
someDiv.appendChild(oTable);
doc = null;
http = null;
}
}
http.send();
}
The testXML.asp file returns valid XML file with contentType set to "text/xml".
Most of the time it works fine, but from time to time (i found no pattern) IE hangs.
The hang occurs before actual drawing of table (drawNodes, appendChild) or in the middle of appending the table (appendChild).
The hang lasts from few minutes to infinity. If the hang timeouts, no call to above function work any more.
The hang occurs unexpectedly retrieving same XML.
Any ideas?
Tomi
Tomi Hrovatin