WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: jeepcherokee on November 19, 2020, 05:43:34 AM

Title: Saratoga - showing wind in km/h and not m/s in some webbrowsers
Post by: jeepcherokee on November 19, 2020, 05:43:34 AM
Hi, I've set my template to show wind in m/s, but now the last months the browser is showing wind in km/h and not m/s
If i have a computer with English language and browser, it show m/s  (even if the webpage is set to norwegian)

On my norwegian computer, and iphone, the webpage shows km/h.    Any ideas?
Title: Re: Saratoga - showing wind in km/h and not m/s in some webbrowsers
Post by: Jasiu on November 19, 2020, 08:10:27 AM
Link to site?
Title: Re: Saratoga - showing wind in km/h and not m/s in some webbrowsers
Post by: jeepcherokee on November 19, 2020, 09:19:07 AM
http://viddefjell.no
Title: Re: Saratoga - showing wind in km/h and not m/s in some webbrowsers
Post by: saratogaWX on November 19, 2020, 10:27:04 AM
Looking at http://viddefjell.no/check-fetch-times.php?show=versions shows you do have some updates to install (which will fix other issues on your site).  I'd suggest you download https://saratoga-weather.org/wxtemplates/Test/check-fetch-times.php?sce=view first and install it on your site, then run check-fetch-times.php?show=versions to get a complete picture of what needs updating.

After you update ajaxCUwx.js to V3.05, be sure to set
Code: [Select]
var useMPS   = true;       // set to true for meters/second for metric wind speeds, false= km/h
to keep m/s displayed for wind speed.

Looking at your site with Firefox, I could not see the m/s to km/h switch you cited -- on the browsers having the issue, I suggest you do a shift-reload of the page to clear the browser cache of possibly old ajaxCUwx.js JavaScript and see if that fixes the issue.

I do recommend you update your site per the first paragraph above .. some of your script versions no longer work due to external website changes, and only the updated scripts work now.
Title: Re: Saratoga - showing wind in km/h and not m/s in some webbrowsers
Post by: jeepcherokee on November 19, 2020, 02:42:44 PM
Hi and thanks for quick and excellent answer. Earlier I did an update but things was messed up and I reverted. Tried again today, and the last nail in the coffin was the .js change and now everything is fine.

Thanks again!