Link to home
Start Free TrialLog in
Avatar of Lee5
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?
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Bu using an image with an additoon ? + randomnumber

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.
oops.......i meant to

http://www.mysite.com/image.gif? + Math.random();
ASKER CERTIFIED SOLUTION
Avatar of semkin
semkin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee5
Lee5

ASKER

Thanks