I'm having trouble trying to refresh a camera image. The first image loads fine, it's the following image(s) that do not load. The image does refresh however when refreshed in a browser so it should be just a matter of java scripting. I have tried several scripts before posting my question. I can make this script work for other static images which leads me to believe the server that is offering up the image is somehow denying the image refresh. The latest script being...
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<body>
<script type="text/javascript">
<!--
var refreshrate=1; //SECONDS BETWEEN REFRESH
var image="http://71.33.210.85/cam0.jpg"; //IMAGE NAME
var imgheight=240; //IMAGE HEIGHT
var imgwidth=320; //IMAGE WIDTH
function refresh(){
document.images["pic"].src=image+"?"+new Date();
setTimeout('refresh()', refreshrate*1000);}
document.write('<IMG SRC="'+image+'" ALT="Alternate Text" NAME="pic" ID="pic" WIDTH="'+imgwidth+'" HEIGHT="'+imgheight+'" STYLE="border: 1px solid Black;">');
if(document.images)window.onload=refresh;
// -->
</script>
</body>
</html>