D
Doug65301
Flightless Bird
This code is working in IE 6 when we hit the same code with IE 8 i'm getting
a null or not an object error.
the error is occuring in the while loop when i'm hA1.innerText = vPro;
the while loop is actually executing for 2 occurences then failing on 3
(should do perform 8 times)
I have been able to debug it to the point that the error has something to do
with the OTR.className = "frmList". (The real kicker is if you run in debug
mode and step into the loop and execute this line everytime it works like a
charm).
I know its has something to do with new IE 8 standards but i am pulling my
hair out trying to figure out whats causing the issue. Any help would be most
appericated.
function fnLoadTable(workData)
{
// Parse the XML Data Island
var i, j, oTD, oTR;
var workData, workNodes;
i=0;
j=0;
// Test for a valid return code. On error, display error message.
msgCode = workData.getAttribute("ReturnCode");
msgText = workData.getAttribute("ReturnText");
msgData = workData.selectSingleNode("/PageRoot/BodyHead/Message").text;
if (msgCode != '0000')
{
msg = 'Error! [' + msgCode + '] ' + msgText + '\n\n' + msgData;
window.alert(msg);
window.status = msgText;
return false;
}
// Clear table before loading
fnClear();
// Place the contents of the XML Data Island into the table
workNodes = workData.selectNodes("/PageRoot/BodyMain");
TrlrScac.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyScac").text;
TrlrNbr.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyTrailer").text;
selType.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyType").text;
TransDate.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyTransDate").text;
TransTime.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyTransTime").text;
window.document.title = 'TEC223 - ' + vTrlrNbr;
i = 0;
workNodes = workData.selectNodes("/PageRoot/BodyMain/EqpRecord");
txtTotal.value = workNodes.selectSingleNode("Total").text;
txtWgt.value = workNodes.selectSingleNode("Wgt").text;
txtHU.value = workNodes.selectSingleNode("HU").text;
txtCap.value = workNodes.selectSingleNode("Cap").text;
txtCft.value = workNodes.selectSingleNode("Cft").text;
workNodes =
workData.selectNodes("/PageRoot/BodyMain/EqpRecord/WgpRecord");
j = workNodes.length;
// while (i != workNodes.length)
while ( i != j )
{
oTR = tblShpList.insertRow();
oTD = oTR.insertCell();
oTD.innerHTML = hidShpList.innerHTML;
oTR.className = "frmList";
// hA1.innerText = workNodes.selectSingleNode("WgpIdNbr").text;
var vPro = workNodes.selectSingleNode("WgpIdNbr").text;
hA1.innerText = vPro;
hA1.style.cursor = 'hand';
hA1.exWgpId = workNodes.selectSingleNode("WgpIdNbr").text;
hA2.innerText = workNodes.selectSingleNode("WgpOrig").text;
hA3.innerText = workNodes.selectSingleNode("WgpShpr").text;
hA4.innerText =
workNodes.selectSingleNode("WgpShprCity").text;
hA5.innerText = workNodes.selectSingleNode("WgpShprSt").text;
hA6.innerText = workNodes.selectSingleNode("WgpPcs").text;
hA7.innerText = workNodes.selectSingleNode("WgpHaz").text;
hA8.innerText = workNodes.selectSingleNode("WgpHL").text;
hA9.innerText = workNodes.selectSingleNode("WgpDueDate").text;
hA10.innerText = workNodes.selectSingleNode("WgpExcp").text;
hB2.innerText = workNodes.selectSingleNode("WgpDest").text;
hB3.innerText = workNodes.selectSingleNode("WgpCons").text;
hB4.innerText = workNodes.selectSingleNode("WgpConsCity").text;
hB5.innerText = workNodes.selectSingleNode("WgpConsSt").text;
hB6.innerText = workNodes.selectSingleNode("WgpWgt").text;
hB7.innerText = workNodes.selectSingleNode("WgpSrvc").text;
hB9.innerText = workNodes.selectSingleNode("WgpDelvDate").text;
hB10.innerText = workNodes.selectSingleNode("WgpDelvExcp").text;
i++;
}
// insert blank trailing row at end of table to insure table sizes correctly
oTR = tblShpList.insertRow();
oTR.style.display = 'none';
oTR.height = '100%';
oTD = oTR.insertCell();
// Reset the cursor
idPageBody.style.cursor = 'auto';
return;
}
a null or not an object error.
the error is occuring in the while loop when i'm hA1.innerText = vPro;
the while loop is actually executing for 2 occurences then failing on 3
(should do perform 8 times)
I have been able to debug it to the point that the error has something to do
with the OTR.className = "frmList". (The real kicker is if you run in debug
mode and step into the loop and execute this line everytime it works like a
charm).
I know its has something to do with new IE 8 standards but i am pulling my
hair out trying to figure out whats causing the issue. Any help would be most
appericated.
function fnLoadTable(workData)
{
// Parse the XML Data Island
var i, j, oTD, oTR;
var workData, workNodes;
i=0;
j=0;
// Test for a valid return code. On error, display error message.
msgCode = workData.getAttribute("ReturnCode");
msgText = workData.getAttribute("ReturnText");
msgData = workData.selectSingleNode("/PageRoot/BodyHead/Message").text;
if (msgCode != '0000')
{
msg = 'Error! [' + msgCode + '] ' + msgText + '\n\n' + msgData;
window.alert(msg);
window.status = msgText;
return false;
}
// Clear table before loading
fnClear();
// Place the contents of the XML Data Island into the table
workNodes = workData.selectNodes("/PageRoot/BodyMain");
TrlrScac.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyScac").text;
TrlrNbr.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyTrailer").text;
selType.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyType").text;
TransDate.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyTransDate").text;
TransTime.value =
workData.selectSingleNode("/PageRoot/BodyMain/KeyTransTime").text;
window.document.title = 'TEC223 - ' + vTrlrNbr;
i = 0;
workNodes = workData.selectNodes("/PageRoot/BodyMain/EqpRecord");
txtTotal.value = workNodes.selectSingleNode("Total").text;
txtWgt.value = workNodes.selectSingleNode("Wgt").text;
txtHU.value = workNodes.selectSingleNode("HU").text;
txtCap.value = workNodes.selectSingleNode("Cap").text;
txtCft.value = workNodes.selectSingleNode("Cft").text;
workNodes =
workData.selectNodes("/PageRoot/BodyMain/EqpRecord/WgpRecord");
j = workNodes.length;
// while (i != workNodes.length)
while ( i != j )
{
oTR = tblShpList.insertRow();
oTD = oTR.insertCell();
oTD.innerHTML = hidShpList.innerHTML;
oTR.className = "frmList";
// hA1.innerText = workNodes.selectSingleNode("WgpIdNbr").text;
var vPro = workNodes.selectSingleNode("WgpIdNbr").text;
hA1.innerText = vPro;
hA1.style.cursor = 'hand';
hA1.exWgpId = workNodes.selectSingleNode("WgpIdNbr").text;
hA2.innerText = workNodes.selectSingleNode("WgpOrig").text;
hA3.innerText = workNodes.selectSingleNode("WgpShpr").text;
hA4.innerText =
workNodes.selectSingleNode("WgpShprCity").text;
hA5.innerText = workNodes.selectSingleNode("WgpShprSt").text;
hA6.innerText = workNodes.selectSingleNode("WgpPcs").text;
hA7.innerText = workNodes.selectSingleNode("WgpHaz").text;
hA8.innerText = workNodes.selectSingleNode("WgpHL").text;
hA9.innerText = workNodes.selectSingleNode("WgpDueDate").text;
hA10.innerText = workNodes.selectSingleNode("WgpExcp").text;
hB2.innerText = workNodes.selectSingleNode("WgpDest").text;
hB3.innerText = workNodes.selectSingleNode("WgpCons").text;
hB4.innerText = workNodes.selectSingleNode("WgpConsCity").text;
hB5.innerText = workNodes.selectSingleNode("WgpConsSt").text;
hB6.innerText = workNodes.selectSingleNode("WgpWgt").text;
hB7.innerText = workNodes.selectSingleNode("WgpSrvc").text;
hB9.innerText = workNodes.selectSingleNode("WgpDelvDate").text;
hB10.innerText = workNodes.selectSingleNode("WgpDelvExcp").text;
i++;
}
// insert blank trailing row at end of table to insure table sizes correctly
oTR = tblShpList.insertRow();
oTR.style.display = 'none';
oTR.height = '100%';
oTD = oTR.insertCell();
// Reset the cursor
idPageBody.style.cursor = 'auto';
return;
}