A
Angel
I have an application with heavy usage of DOM
Initially the application was supposed to be only IE specific, but now
we need to support it for Firefox also.
As an example consider the following HTML
<html>
<head></head>
<body>
<table border="1" cellspacing="5" cellpadding="5" id="RCTable">
<tr>
<td>R1, C1</td>
<td>R1, C2</td>
<td>R1, C3</td>
</tr>
<tr>
<td>R2, C1</td>
<td>R2, C2</td>
<td id="r2c3">R2, C3</td>
</tr>
</table>
<script language="JavaScript">
TableObject =
(document.getElementById('RCTable').getElementsByTagName('tr'));
alert(TableObject[1].childNodes[1].innerHTML);
</script>
</body>
</html>
In Firefox the alert displays "R2, C1"
However in IE the same alert displays "R2, C2"
How do I get both the browsers to read the same cells.?
How do i read the table contents in Firefox?
Does firefox support the innerText property?
Hope I make sense
Regards,
Angel
Initially the application was supposed to be only IE specific, but now
we need to support it for Firefox also.
As an example consider the following HTML
<html>
<head></head>
<body>
<table border="1" cellspacing="5" cellpadding="5" id="RCTable">
<tr>
<td>R1, C1</td>
<td>R1, C2</td>
<td>R1, C3</td>
</tr>
<tr>
<td>R2, C1</td>
<td>R2, C2</td>
<td id="r2c3">R2, C3</td>
</tr>
</table>
<script language="JavaScript">
TableObject =
(document.getElementById('RCTable').getElementsByTagName('tr'));
alert(TableObject[1].childNodes[1].innerHTML);
</script>
</body>
</html>
In Firefox the alert displays "R2, C1"
However in IE the same alert displays "R2, C2"
How do I get both the browsers to read the same cells.?
How do i read the table contents in Firefox?
Does firefox support the innerText property?
Hope I make sense
Regards,
Angel