Solved

WebCam setup

Posted on 2000-05-13
4
131 Views
Last Modified: 2010-04-09
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?
0
Comment
Question by:Lee5
  • 2
4 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 2807968
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.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2807971
oops.......i meant to

http://www.mysite.com/image.gif? + Math.random();
0
 

Accepted Solution

by:
semkin earned 50 total points
ID: 2810961
Hi!
We have similar page with web-camera.
Also we use a refresh-method for clients with low speed of connection to the Internet.

Try to make so:

=======================================

<META HTTP-EQUIV="EXPIRES" CONTENT="0">
<meta http-equiv="Refresh" content="15">
<meta http-equiv="Pragma" content="no-cache">
</head>

<body>
<img src="http://www.zzz.com/webcam.jpg" width=* height =* >...

=======================================

Differently go to http://weather.tomsk.net, click on an icon with the camera and look a refresh-method.

Good luck!
Excuse for my bad English.
semkin :)
0
 

Author Comment

by:Lee5
ID: 2813904
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now