Forum Moderators: open
The following script works in IE.
<script language="javaScript">
var d=document.all;
function addRows()
{
var length=d.mainTable.rows.length;
var a = d.mainTable.insertRow();
var b = a.insertCell(0);
b.innerHTML=d.subTable.innerHTML;
}
</script>
Thanks,
Sireesha
At the moment you're doing it the IE way with document.all which is fine.
You also need to do it the Netscape way which uses document.getElementById
Use some browser sniffing code to determine which browser the user has (there are lots of sample scripts available for browser sniffing) and then use an if statement to either do it the IE way or the Netscape way.