Page 3 of 3
Re: Web tag parameters
Posted: Fri 04 Mar 2011 3:17 pm
by nking
mcrossley wrote:It assumes you have a page that is being updated via a client side script from the realtime.txt file.
Hmm, that's probably as clear as mud!
Thanks for the reply Mark.
I'm not processing the realtime.txt file so I think I have a way to go before I can expect to clear the mud
I think I will probably wait for Steve to add this as a feature (he is short of time and I'm short of brain cells) within Cumulus

Re: Web tag parameters
Posted: Fri 04 Mar 2011 9:59 pm
by Synewave
Mark, Neil,
I think the bit that is missing to make the 'mud' clearer is that the code that Mark has quoted needs to be within <script> and </script> in the HTML, or call an external script.
Mark, I think you need to elaborate on the method to achieve this.
Re: Web tag parameters
Posted: Fri 04 Mar 2011 11:36 pm
by gemini06720
Synewave wrote:Mark, I think you need to elaborate on the method to achieve this.
Indeed Paul, the code proposed by Mark should be included (or added) into an external JS script such as the one you released (ie: 'realtimereader.js') a while back so additional lines of code do not have to be added to the HTM file(s)...

Re: Web tag parameters
Posted: Sat 05 Mar 2011 10:04 am
by mcrossley
Indeed, they are just code snippets intended to provide a suggestion to people who are already doing this sort of thing. For instance the <span> 'populator' code would go into a function on its own.
As I said, having the data in an object with properties with the same names as the web tag names, and spans with the same ids again means you can automate the actual updates, and not have to worry about changing the code when adding tags to the HTML.
And the bit about me 'not' parsing the realtime.txt? I have a custom realtimeJS.txt that looks like this...
Code: Select all
...
cumulus.dew="<#dew>";
cumulus.wspeed="<#wspeed>";
cumulus.wlatest="<#wlatest>";
cumulus.wgust="<#wgust>";
cumulus.wchill="<#wchill>";
...
Again, an eval() of that file, updates all the current values on the client side.
Re: Web tag parameters
Posted: Sat 05 Mar 2011 10:12 am
by nking
mcrossley wrote:Indeed, they are just code snippets intended to provide a suggestion to people who are already doing this sort of thing.
I think that is the key point, I'm not there yet so will need to read more to understand how and what needs to be done. Something for my book reading list it seems.... Idiots Guide for Java Scripting?