We have a web page set up to display a pair of IP cameras (using tables) with buttons to pull new images. There is a "Current time" display line coded as shown –
<snip>
Current time: <span id='nowtime'>, new Date().toLocaleString(), </span>
<script>
if (document.getElementById) onload = function ()
{ setInterval ("document.getElementById ('nowtime').firstChild.data = new Date().toLocaleString()", 50) }
</script>
</snip>
The problem is, when we [or timer, via a meta refresh command] activate the image refresh, the "current time" display stays showing these ugly code fragments – "Current time:, new Date().toLocaleString()," for more than a second before relaxing to the correct form – "Current time: 8/15/2022, 6:59:53 PM" information.
Is there a way to suppress that ugliness?