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.
blue row alerts 9.
red row is the row that returns error.
I added an extra alert to determine whether error is correct.
Code:
[size=1] window.onload = function() { [color=blue]alert(aDevices.length);[/color] 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>"); [color=red]for (var iA=0; iA < aDevices.length ;iA++)[/color] { 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() }[/size]
red row is the row that returns error.
Comment