Fairly new to website development etc so I need a bit of help please.
Basically what im trying to do is place an arrow next to temperaturetrendtext tag
Ive tried with this script but getting nowhere.
<script type="text/javascript">
var #temptrendtext = ;
if (temptrendtext=steady){var image = "steady.bmp";}
if (temptrendtext=rising){var image = "up.bmp";}
if (temptrendtext=falling){var image = "down.bmp";}
document.write('<img src="http://www.abbeyhultonweather.com/images/'+image+'"/>');
</script>
Thanks
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
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
Javascript Code
Moderator: daj
-
liamcarbin
- Posts: 50
- Joined: Fri 24 Feb 2012 9:57 am
- Weather Station: Fine Offset
- Operating System: Windows 7/8
- Location: United Kingdom
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Javascript Code
You don't need to use javascript at all. If you give your images the same names as the temperature trend values, ie. steady.bmp, rising.bmp, and falling.bmp, then a simple bit of html will do:
<img src="http://www.abbeyhultonweather.com/image ... dtext>.bmp"/>
<img src="http://www.abbeyhultonweather.com/image ... dtext>.bmp"/>
Steve
-
liamcarbin
- Posts: 50
- Joined: Fri 24 Feb 2012 9:57 am
- Weather Station: Fine Offset
- Operating System: Windows 7/8
- Location: United Kingdom
Re: Javascript Code
Thanks Steve, I have applied the same to forecast by changing <temptrendtext> to <forecast> works a treat 