Lee5
asked on
WebCam setup
I have an application that sends a new .jpg file to my server every 15 seconds (from my camera). I tried to use:
<meta HTTP-EQUIV="Refresh" CONTENT="15; URL=http://www.zzz.com/webcam.htm">
to make the page refresh every 15 seconds but it doesn't update the picture. The html is simply a page with a jpg picture. How can I make the page continue to update when I send a new picture?
<meta HTTP-EQUIV="Refresh" CONTENT="15; URL=http://www.zzz.com/webcam.htm">
to make the page refresh every 15 seconds but it doesn't update the picture. The html is simply a page with a jpg picture. How can I make the page continue to update when I send a new picture?
oops.......i meant to
http://www.mysite.com/image.gif? + Math.random();
http://www.mysite.com/image.gif? + Math.random();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
ie. with javascript it'd look like:
<script language=javascript>
<!--
var MyImg = new Image();
function UpdatePic()
{
MyImg.src="http://www.mysite.com/image?"+ Math.random();
document.MyWebcam.src = MyImg.src;
setTimeout("UpdatePic()", 150);
}
setTimeout("UpdatePic()", 150);
//-->
</script>
<img id=MyWebcam>
or something like that. This way you don't even have to use the META refresh tag.