JavaScript – Timed Auto-Refresh Image

*I had to hack up the html because im too lazy to figure out how to handle it with jinja right now. (take out the #’s)*

Very simple JavaScript to refresh html every 3 seconds (there are probably better ways to do this but)

<#html>
<#head>
<#/head>
<#body>
<#div id="picM">

<#script type="text/javascript">
function updateImage() {
document.getElementById(‘picM’).innerHTML = ‘<#img src="F:\\ttest\\Routput\\m.png#e' + Math.random() + '"><#/img>‘;
setTimeout(updateImage, 3000);
return;
}
window.onload=updateImage()
<#/script>
<#/body>
<#/html>