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

Humidity Unit Tag?

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

Moderator: daj

User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Humidity Unit Tag?

Post by steve »

This is a guess, but perhaps changing

Code: Select all

set_ajax_obs("ajaxrainratehr",rainratehr.toFixed(dpRain) + uomRain);
to

Code: Select all

set_ajax_obs("ajaxrainratehr",rainratehr.toFixed(dpRain) + uomRain +"/hr");
would achieve what you want.

But as I said, this is a complete guess, because I know absolutely nothing about how any of this works. I hesitated before suggesting it, because hacking around in things that you don't understand is dangerous, as you have demonstrated on numerous occasions already. This change could have any number of unwanted side effects, some of which may not appear until some time later, and it may not be obvious what the cause is.

My advice would be to leave it alone unless you understand how the code works and what the effects are of any changes. But I thought I'd seen you say on another thread that you had written most of the code for your web site yourself? Are you not using Ken's code now?
Steve
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Humidity Unit Tag?

Post by William Grimsley »

steve wrote:This is a guess, but perhaps changing

Code: Select all

set_ajax_obs("ajaxrainratehr",rainratehr.toFixed(dpRain) + uomRain);
to

Code: Select all

set_ajax_obs("ajaxrainratehr",rainratehr.toFixed(dpRain) + uomRain +"/hr");
would achieve what you want.

But as I said, this is a complete guess, because I know absolutely nothing about how any of this works. I hesitated before suggesting it, because hacking around in things that you don't understand is dangerous, as you have demonstrated on numerous occasions already. This change could have any number of unwanted side effects, some of which may not appear until some time later, and it may not be obvious what the cause is.

My advice would be to leave it alone unless you understand how the code works and what the effects are of any changes. But I thought I'd seen you say on another thread that you had written most of the code for your web site yourself? Are you not using Ken's code now?
Hi Steve,

Yes, I'll think I will leave it as it is, for now.

What do you mean by "using Ken's code now?"

Thanks for your help,

William
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Humidity Unit Tag?

Post by gemini06720 »

steve wrote:This is a guess...
Steve, I think you are right on that guess... ;)
steve wrote:This change could have any number of unwanted side effects, some of which may not appear until some time later, and it may not be obvious what the cause is.
Trust me on this, if the change is no made appropriately, the script will just ... die ... with no error message whatsoever... :twisted:
steve wrote:My advice would be to leave it alone unless you understand how the code works and what the effects are of any changes.
You must be addressing this reply to the one that like to split hair in eight ... :roll: ...I has been a blessing/relief to not have to see those kind of messages anymore... :mrgreen:
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Humidity Unit Tag?

Post by steve »

William Grimsley wrote:What do you mean by "using Ken's code now?"
I mean are you or are you not using the "Saratoga Templates" written by Ken True? In this thread - https://cumulus.hosiene.co.uk/viewtopic.php?f=25&t=9570 - you said "you may have not noticed, but most of my site is coded all by me".
Steve
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Humidity Unit Tag?

Post by William Grimsley »

steve wrote:
William Grimsley wrote:What do you mean by "using Ken's code now?"
I mean are you or are you not using the "Saratoga Templates" written by Ken True? In this thread - https://cumulus.hosiene.co.uk/viewtopic.php?f=25&t=9570 - you said "you may have not noticed, but most of my site is coded all by me".
Yes, I am using the "Saratoga Templates" written by Ken True! :D
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Humidity Unit Tag?

Post by William Grimsley »

steve wrote:This is a guess, but perhaps changing

Code: Select all

set_ajax_obs("ajaxrainratehr",rainratehr.toFixed(dpRain) + uomRain);
to

Code: Select all

set_ajax_obs("ajaxrainratehr",rainratehr.toFixed(dpRain) + uomRain +"/hr");
Thanks very much! Your fix worked! :D
Post Reply