I do not understand why I am not seeing each number diaplyed in the div.
My code...
<head>
<script>
function countit(i)
{
document.getElementById('counter').innerHTML = i;
}
</script>
</head>
<body>
<div id="counter"></div>
<script>countit(1)</script>
<?php sleep(1); ?>
<script>countit(2)</script>
<?php sleep(1); ?>
<script>countit(3)</script>
</body>
I have a php script which process several records from a database and I want to display a counter of the current recod being processed. I thought JS was the way to do that. I saw something very similiar to the code above recommended on so.
Any insight would be greatly appreciated.