Martin said the following on 4/3/2007 5:27 PM:
Yes. They don't even know about each other.
How so? Test page that shows them interfering?
I can't make a test page available to you but here's the code I'm
working with:
This is part of a page in which I'm using an httpRequest to display
some frequently changing information in a table. It's making the
request every 400 ms with the GetScanInfo function. When the data is
received and displayed, the background color of the row is set to
yellow. The ResetColor function is then called with a 700 ms delay to
change the color back to white. It is this ResetColor function that is
not executing.
Do you see anything wrong?
Thanks.
var http = getHTTPObject();
var TheRow;
function handleHttpResponse() {
var Msgs;
if (http.readyState == 4) {
if (http.status == 200) {
Msgs = http.responseText.split("|");
var gSP = parseInt(Msgs[1]);
TheRow = document.getElementById('TableX').rows[gSP];
if (TheRow.cells[5].innerHTML != Msgs[6]) {
TheRow.cells[1].innerHTML = Msgs[2];
TheRow.cells[2].innerHTML = Msgs[3];
TheRow.cells[3].innerHTML = Msgs[4];
TheRow.cells[4].innerHTML = Msgs[5];
TheRow.cells[5].innerHTML = Msgs[6];
TheRow.cells[1].title = 'Time Of Scan: ' + Msgs[6];
TheRow.style.backgroundColor = 'yellow';
window.setTimeout("ResetColor(gSP)",700);
}
NextSP = gSP + 1;
if (NextSP > 12) {NextSP = 1};
window.setTimeout("GetScanInfo(NextSP)",400);
}
}
}
function ResetColor(XX) {
document.getElementById('TableX').rows[XX].style.backgroundColor =
'white';
}
function GetScanInfo(SP) {
http.open("GET", "ScanInfo.HTM?" + SP, true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
}