I wrote a following function just for testing purposes:
<html>
<head>
<script>
function show(obj) {
alert(obj.previ ousSibling.rowI ndex)
alert(obj.rowIn dex)
alert(obj.nextS ibling.rowIndex )
}
</script>
</head>
<body>
<table>
<tr >
<td></td><td></td></tr>
<tr onclick="show(t his)">
<td>1</td><td>somethin g</td></tr>
<tr onclick="show(t his)">
<td></td><td></td></tr>
<tr onclick="show(t his)">
<td>2</td><td>somethin g</td></tr>
<tr onclick="show(t his)">
<td></td><td></td></tr>
<tr onclick="show(t his)">
<td>3</td><td>somethin g</td></tr>
<tr>
<td></td><td></td></tr>
</table>
</form>
</body>
</html>
Under MSIE it seems to work correctly, while when run under Mozilla 1.6 it
returns "undefined" for previousSibling and nextSibling, is there any way
of accessing neighbour rows from a "this" row under Mozilla?
<html>
<head>
<script>
function show(obj) {
alert(obj.previ ousSibling.rowI ndex)
alert(obj.rowIn dex)
alert(obj.nextS ibling.rowIndex )
}
</script>
</head>
<body>
<table>
<tr >
<td></td><td></td></tr>
<tr onclick="show(t his)">
<td>1</td><td>somethin g</td></tr>
<tr onclick="show(t his)">
<td></td><td></td></tr>
<tr onclick="show(t his)">
<td>2</td><td>somethin g</td></tr>
<tr onclick="show(t his)">
<td></td><td></td></tr>
<tr onclick="show(t his)">
<td>3</td><td>somethin g</td></tr>
<tr>
<td></td><td></td></tr>
</table>
</form>
</body>
</html>
Under MSIE it seems to work correctly, while when run under Mozilla 1.6 it
returns "undefined" for previousSibling and nextSibling, is there any way
of accessing neighbour rows from a "this" row under Mozilla?
Comment