Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Webcam Refresh Script

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
richardmhowell
Posts: 16
Joined: Thu 30 Aug 2012 12:35 pm
Weather Station: WH1090
Operating System: Windows XP SP3
Location: United Kingdom

Webcam Refresh Script

Post by richardmhowell »

Hello All,

I had been looking for a script to refresh the webcam images on my site without refreshing the entire page, after a bit of digging i found this;

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
refreshImage = function()
{
img = document.getElementById("cam");
img.src="http://ephratareview.com/cam/mainstate.jpg?rand=" + Math.random();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Auto-Refresh</title>
</head>
<body onload="window.setInterval(refreshImage, 1*1000);">
<img src="http://ephratareview.com/cam/mainstate.jpg" id="cam" />
</body>
</html>
I got this to work perfectly for me on my site and wanted to share it incase anyone else needed something simillar.

Rich
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Webcam Refresh Script

Post by beteljuice »

Didn't read the webcam section then ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: Webcam Refresh Script

Post by ace2 »

richardmhowell wrote:Hello All,

I had been looking for a script to refresh the webcam images on my site without refreshing the entire page, after a bit of digging i found this;

Rich
Maybe be a old post, but still does the job, tx...
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
Post Reply