I'm trying to write code that will take Davis's forecastRule (a number) and display this on my webpage as text by reading the number off an array and returning the text corresponding to that number.
For example if the Davis forecastRule returned is 5, I want the webpage to display "Partly cloudy and cooler" which is the corresponding forecast in text form. I'm not sure on the best way to do this but am trying to do it with Javascript with instructions to pull the text from an external text file (set up as a JS array) containing the nearly 200 text strings. I'm getting bogged down with the syntax and would appreciate any help. Should I be doing it a different way ie not using JS? I don't know how to declare the variable if the array lives in an external file. Thanks for any help! PJD -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f562b9c5-c551-45b2-a9a4-25848d847aad%40googlegroups.com.