Yes, that too. My slightly autistic nature only lets me process one problem at a timemcrossley wrote:Try changing http://corsair.gr/images/ to http://www.corsair.gr/wxpage/images/
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 4019) - 03 April 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 4019) - 03 April 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
Trend arrow Javascript
Moderator: daj
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Trend arrow Javascript
Steve
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Trend arrow Javascript
Actually, there doesn't seem to be one for temperature trend. The standard gauges page uses <#temptrendtext> and <#temptrendtextenglish>steve wrote:You can use the web tags which replace the comma with a decimal point,
Steve
- mcrossley
- Posts: 12767
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Trend arrow Javascript
Which is why is it easier to reanme the images steady.png, rising.png, falling.png and then just use...
(typing on a wobbly train - apologies for mistakes)
Code: Select all
<img src="xxxxx\<#temptrendtextenglish>.png" alt="<#temptrendextenglish>" />
-
- Posts: 5
- Joined: Tue 09 Nov 2010 10:38 am
- Weather Station: Davis Vantage Pro 2
- Operating System: Win Seven
Re: Trend arrow Javascript
Did the rename to www, no luck! Sorry but I don't understand this... How can I use it? Strange thing that I use same syntax from Station Sensor Led, few lines below, that works perfect...mcrossley wrote:Which is why is it easier to reanme the images steady.png, rising.png, falling.png and then just use...(typing on a wobbly train - apologies for mistakes)Code: Select all
<img src="xxxxx\<#temptrendtextenglish>.png" alt="<#temptrendextenglish>" />
-
- Posts: 642
- Joined: Mon 25 Jan 2010 1:55 pm
- Weather Station: Watson W-8681
- Operating System: Raspian
- Location: Brighton, UK
- Contact:
Re: Trend arrow Javascript
Corsair,
As Mark and Steve have said, it is probably better to use the <#temptrendtext> as the comma as the decimal seperator will cause it to fail. You could write some Javascript to replace the , with a . but this way will be much easier:
Locate this line in your indexT.htm file:
and replace it with:
You will also need to rename your up and down arrow images as follows:
up.png becomes Rising.png
down.png becomes Falling.png
These images will need to be in your images folder on your website.
As Mark and Steve have said, it is probably better to use the <#temptrendtext> as the comma as the decimal seperator will cause it to fail. You could write some Javascript to replace the , with a . but this way will be much easier:
Locate this line in your indexT.htm file:
Code: Select all
<td><#temp> <#tempunit></td>
Code: Select all
<td><#temp> <#tempunit> <img src="images/<#temptrendtext>.png" alt="<#temptrendext>" /></td>
up.png becomes Rising.png
down.png becomes Falling.png
These images will need to be in your images folder on your website.
-
- Posts: 5
- Joined: Tue 09 Nov 2010 10:38 am
- Weather Station: Davis Vantage Pro 2
- Operating System: Win Seven
Re: Trend arrow Javascript
THANK YOU, all for your instructions... With Paul's step by step info, I manage it! Thank you Paul! BTW, excellent site! Great job for Great College!! If you don't mind, I will ask you for more info about History data in your page!
-
- Posts: 642
- Joined: Mon 25 Jan 2010 1:55 pm
- Weather Station: Watson W-8681
- Operating System: Raspian
- Location: Brighton, UK
- Contact:
Re: Trend arrow Javascript
Corsair,
Glad to see you've got it working. Just had a look at your images folder, although I didn't say so before, you will also need a Steady.png file in your images folder.
Thanks for the compliment about my website.
Glad to see you've got it working. Just had a look at your images folder, although I didn't say so before, you will also need a Steady.png file in your images folder.
Thanks for the compliment about my website.
-
- Posts: 5
- Joined: Tue 09 Nov 2010 10:38 am
- Weather Station: Davis Vantage Pro 2
- Operating System: Win Seven
Re: Trend arrow Javascript
Thank you again Paul. Was there but with small "s"... Good morning from sunny Athens
-
- Posts: 38
- Joined: Tue 07 Feb 2012 11:51 am
- Weather Station: WS2350 & Davis VP2
- Operating System: Win 7
- Location: Italy
- Contact:
Re: Trend arrow Javascript
Hi .... wonder where he constantly make mistakes ... I rewrote the same code 10 times but I do not see anything on Safari or Chrome .... thanks!
<!-- Temperatura_1_linea -->
<tr class="td_temperature_data">
<td><font size="2">Temperatura esterna</font></td>
<td><#temp> <#tempunit><script type="text/javascript">
var temp = <#temptrend>;
if (temp==0){var imagen = "steady.bmp";}
if (temp>0){var imagen = "up.bmp";}
if (temp<0){var imagen = "down.bmp";}
document.write('<img src="http://piavemeteo.altervista.org/images/'+imagen+'"/>');
</script></td>
<td><font size="2">Dew point</font></td>
<td><#dew> <#tempunit></td>
</tr>
<!-- Temperatura_1_linea -->
<tr class="td_temperature_data">
<td><font size="2">Temperatura esterna</font></td>
<td><#temp> <#tempunit><script type="text/javascript">
var temp = <#temptrend>;
if (temp==0){var imagen = "steady.bmp";}
if (temp>0){var imagen = "up.bmp";}
if (temp<0){var imagen = "down.bmp";}
document.write('<img src="http://piavemeteo.altervista.org/images/'+imagen+'"/>');
</script></td>
<td><font size="2">Dew point</font></td>
<td><#dew> <#tempunit></td>
</tr>
My Weather Station: http://piavemeteo.altervista.org
- 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: Trend arrow Javascript
Because of all the comments above !!!!!
Currently your Cumulus processed script says:
var temp = -1,7;
COMMA decimal delimiter .....
So the maths comparrisons do not work correctly.
As above, use #temptrendenglish method instead.
Currently your Cumulus processed script says:
var temp = -1,7;
COMMA decimal delimiter .....
So the maths comparrisons do not work correctly.
As above, use #temptrendenglish method instead.
......................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: Trend arrow Javascript
Can i use them so it auto refresh the icon with out refresh the page to get the icon to up date