Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4021) - 04 May 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4021) - 04 May 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
webcam refresh webpage
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
webcam refresh webpage
hi all ive just set up a webcam and it up load the photos to my website but i have to keep refreshing the page so is there a way to auto refesh the page with out me doing it but can some one right the code as im a starter meny thank
-
- Posts: 3266
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: webcam refresh webpage
Code: Select all
<script type="text/javascript">
// <![CDATA[
var refreshrate = 30; // seconds between refresh
var image = "http://yourwebsite.co.uk/webcampicture.jpg"; // image name
var imgwidth = 640; // image width
var imgheight = 480; // image height
var imgalt = "WebCam Image";
var imgtitle = "header=[WebCam Image] body=[WebCam Image Automatically Updated Every 30 Seconds] delay=[1000]";
function refresh() { document.images["pic"].src = image + "?" + new Date(); setTimeout('refresh()', refreshrate * 1000); }
document.write('<img src="' + image + '" alt="' + imgalt + '" title="' + imgtitle + '" name="pic" id="pic" width="' + imgwidth + '" height="' + imgheight + '" style="border: none;" />');
if(document.images)window.onload=refresh;
// ]]>
</script>
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam refresh webpage
ok thak u so muchso where in the html i put this bite of code right at top?
-
- Posts: 3266
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: webcam refresh webpage
Wherever you want the picture to appear. Using <center> Code </center> in the body are of the HTML would make it appear in the middle of the page. Example here http://www.dmjsystems.co.uk/weather/webcam.php (mine only runs in daylight hours otherwise the image says offline).
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam refresh webpage
ok i want the full background photo i saw ur code where you set the size? so how do i make it full sceen
-
- Posts: 3266
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: webcam refresh webpage
Set
to the size of your screen in pixels, but if you do that there will be no room for your menu etc. except by scrolling the screen.
Code: Select all
var imgwidth = 640; // image width
var imgheight = 480; // image height
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam refresh webpage
hi im stuck can u help me plz
-
- Posts: 3266
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: webcam refresh webpage
I can try but a URL to your website so I can see what you have done would be helpful.
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam refresh webpage
www.davisworthing.co.uk that my website and u will sell the webcam photo as my background that the one i want to refresh
- 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 webpage
You want change the backgound of the body of the page !
So this is a css / JavaScript combination ...
Try something like:Untested .. may have my syntax wrong !!!
So this is a css / JavaScript combination ...
Try something like:
Code: Select all
<script type="text/javascript">
// <![CDATA[
var refreshrate = 30; // seconds between refresh
var image = "http://yourwebsite.co.uk/webcampicture.jpg"; // image name
function refresh() { document.body.style.background ="url('image + '?' + new Date()') size 100% 100%"; setTimeout('refresh()', refreshrate * 1000); }
if(document.images)window.onload=refresh;
// ]]>
</script>
......................Imagine, what you will KNOW tomorrow !
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam refresh webpage
so this code gose in css file then??
- 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 webpage
No .. It's JavaScript (Which happens to be updating a CSS / object property)
.. to replace that which you are trying already.
.. to replace that which you are trying already.
......................Imagine, what you will KNOW tomorrow !
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam refresh webpage
OK I will try the the line in the css to point to the photo background have I got to remove that ?
- 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 webpage
No need really.
If the JS 'fails' for any reason, then the body background-image will be the one defined in weatherstyles.css.
If the JS is working, then assuming your webcam pic always has the same name ...will change the background.
The ?'date' suffix is a cache buster so that the image is always the latest one.
If the JS 'fails' for any reason, then the body background-image will be the one defined in weatherstyles.css.
If the JS is working, then assuming your webcam pic always has the same name ...
Code: Select all
document.body.style.background ="url('image + '?' + new Date()')
The ?'date' suffix is a cache buster so that the image is always the latest one.
......................Imagine, what you will KNOW tomorrow !
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam refresh webpage
ok this is geting relly hard for me if i geve u the html can u edit it plz ? lol sorry