The code below fails with an "Object does not support this property or method" error under ie6. I think that the row does support a style property because I can set it statically. This makes me think that it is the [tt]getObjectById()[/tt] method which is failing but I cannot see why. Any enlightenment gratefully received.
[tt]
<html><head>
<script LANGUAGE="JavaScript">
function row( spec ) {
document.GetElementById('datum' + spec).style = 'background-color: red;';
return true;
}
</script>
</head>
<body>
<table border=1 width="30%">
<tr style='background-color: blue;' id='datum0'>
<td onClick='row(0);'>a</td>
<td onClick='row(0);'>1</td>
</tr>
</table>
</body>
</html>
[/tt]
Yours, "As soon as we started programming, we found to our surprise that it wasn't as
easy to get programs right as we had thought. Debugging had to be discovered.
I can remember the exact instant when I realized that a large part of my life
from then on was going to be spent in finding mistakes in my own programs."
--Maurice Wilk
[tt]
<html><head>
<script LANGUAGE="JavaScript">
function row( spec ) {
document.GetElementById('datum' + spec).style = 'background-color: red;';
return true;
}
</script>
</head>
<body>
<table border=1 width="30%">
<tr style='background-color: blue;' id='datum0'>
<td onClick='row(0);'>a</td>
<td onClick='row(0);'>1</td>
</tr>
</table>
</body>
</html>
[/tt]
Yours, "As soon as we started programming, we found to our surprise that it wasn't as
easy to get programs right as we had thought. Debugging had to be discovered.
I can remember the exact instant when I realized that a large part of my life
from then on was going to be spent in finding mistakes in my own programs."
--Maurice Wilk