Zvona
06-25-2002, 11:15 AM
Following scripts works on IE6 just as meant. However, Mozilla 1.0RC3 returns an error "aDevices is not defines". aDevices is a global variable.
I added an extra alert to determine whether error is correct.
window.onload = function()
{
alert(aDevices.length);
document.open();
document.write("<table border='1'><thead><tr><th align=left>Name</th><th>Type</th><th>IP-Address</th><th># Polls</th></tr></thead><tbody>");
for (var iA=0; iA < aDevices.length ;iA++)
{
document.write("<tr><td>"+ aDevices[iA].dispName +sCell+ aDevices[iA].pollType +sCell+ aDevices[iA].ip +sCell+ aDevices[iA].pollCount +"</td></tr>");
}
document.write("</tbody></table>");
document.close()
}
blue row alerts 9.
red row is the row that returns error.
I added an extra alert to determine whether error is correct.
window.onload = function()
{
alert(aDevices.length);
document.open();
document.write("<table border='1'><thead><tr><th align=left>Name</th><th>Type</th><th>IP-Address</th><th># Polls</th></tr></thead><tbody>");
for (var iA=0; iA < aDevices.length ;iA++)
{
document.write("<tr><td>"+ aDevices[iA].dispName +sCell+ aDevices[iA].pollType +sCell+ aDevices[iA].ip +sCell+ aDevices[iA].pollCount +"</td></tr>");
}
document.write("</tbody></table>");
document.close()
}
blue row alerts 9.
red row is the row that returns error.