<html>
<head>
<script languages="javascript">
var i = 0;
function incCounter()
{
i++;
document.getElementById("bug").innerHTML = i;
document.getElementById("check_counter").innerHTML = document.getElementById("bug").innerHTML;
}
function changeDisplay()
{
document.getElementById("bug").style.display = 'block';
}
</script>
</head>
<body>
<table border="1">
<tr>
<td>counter value : <span id="check_counter">0</span></td>
<td>counter value displayed in a
textarea <br\><textarea cols="3" rows="1" id="bug">0</textarea></td>
</tr>
</table>
<a href="javascript:incCounter();">increment counter</a>
<a href="javascript:changeDisplay();">change display</a>
<h1>bug explanation</h1>
<p>
First, if you click on the "increment counter" link, the counter
in the textarea is correctly incremented.
</p>
<p>
Then, if you click on the "change display" link, clicking on
"increment counter" has no visible effect on the textarea. But
the counter is correctly incremented, as we can see in the first
cell of the table.
</p>
</body>
</html>