Solved

WebCam setup

Posted on 2000-05-13
4
130 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
Comment Utility
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
Comment Utility
oops.......i meant to

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

Accepted Solution

by:
semkin earned 50 total points
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 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

12 Experts available now in Live!

Get 1:1 Help Now