Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
tag problem
Moderator: daj
- w5afw
- Posts: 154
- Joined: Thu 29 Jan 2009 8:48 pm
- Weather Station: ws-2315
- Location: Houston, the Eagle has landed, TX
- Contact:
tag problem
I'm trying to print the temperature #temp twice on one page and the second instance always outputs ??. How can I fix this? Thanks...
Re: tag problem
I just put:in the standard indexT.htm file and let Cumulus process and upload it to the web server. The web page dutifully showed: Could you post some more information about your environment?
Code: Select all
<#temp><#temp><#temp><#temp>
Code: Select all
12.112.112.112.1
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: tag problem
I can't think of any reason duplicated tags shouldn't work, if you have the syntax correct.
Steve
Steve
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: tag problem
I assume you are staying with the AJAX philosophy ?
I haven't inspected the code you are using, but it probably uses unique id substitution. So every 'variable' used on any particular page would have to be unique.
I haven't inspected the code you are using, but it probably uses unique id substitution. So every 'variable' used on any particular page would have to be unique.
Last edited by beteljuice on Sun 05 Apr 2009 2:18 pm, edited 1 time in total.
......................Imagine, what you will KNOW tomorrow !
Re: tag problem
This is a snippet from the page
This is based on Ritchie's AJAX implementation. I seem to remember it copes with multiple span occurences by making the span name unique. Try adding '_01' to the temperature span ID to make it unique.
Use:
In place of:
This is all from my lousy memory - the correct answer is buried somewhere in the text/comment sections of the code...
Code: Select all
<head>
<title>w5afw Weather Station</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<!-- **** layout stylesheet **** -->
<link rel="stylesheet" type="text/css" href="style/style_1col_bottom.css" />
<!-- **** colour stylesheet **** -->
<link rel="stylesheet" type="text/css" href="style/colour.css" />
<script src="prototype.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
document.observe('dom:loaded', function () {
var url = 'xmlreturn.php';
Use:
Code: Select all
<h1><span id="#temp" class="refresh"></span> <span id="#temp_01" class="unit"></span></h1>
Code: Select all
<h1><span id="#temp" class="refresh"></span> <span id="_01#temp" class="unit"></span></h1>
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: tag problem
So this is actually nothing to do with Cumulus tags?
Steve
Steve
Re: tag problem
Yep - This has nothing at all to do with the Cumulus tags...steve wrote:So this is actually nothing to do with Cumulus tags?
Steve
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: tag problem
Steve - Nowt to do with Cumulus
Mark, as far as I can see all you have done is change the temp UNIT id to an 'illegal' value
I cannot see the same flexibility for duplicate 'data' values as there is for duplicate 'unit' values.
You would have to get your hands dirty in the script itself
Mark, as far as I can see all you have done is change the temp UNIT id to an 'illegal' value
I cannot see the same flexibility for duplicate 'data' values as there is for duplicate 'unit' values.
You would have to get your hands dirty in the script itself
......................Imagine, what you will KNOW tomorrow !
- w5afw
- Posts: 154
- Joined: Thu 29 Jan 2009 8:48 pm
- Weather Station: ws-2315
- Location: Houston, the Eagle has landed, TX
- Contact:
Re: tag problem
trying; still no joy. the first instance:
and the second:
the test url is:
www.w5afw.com/wx/index.php
Code: Select all
<h1><span id="#location" class="onceonly"></span> Weather<br><br> <span id="#temp" class="refresh"></span><span id="_01#temp" class="unit"></span></h1>
Code: Select all
<div class="datacontent">
<h2>Temperature and Humidity</h2>
<div class="datacontentp">
<table width="100%">
<tr class="td_temperature_data">
<td>Temperature: <span id="#temp" class="refresh"></span> <span id="_02#temp" class="unit"></span></td>
<td>Dew Point: <span id="#dew" class="refresh"></span> <span id="_03#temp" class="unit"></span></td>
www.w5afw.com/wx/index.php
- w5afw
- Posts: 154
- Joined: Thu 29 Jan 2009 8:48 pm
- Weather Station: ws-2315
- Location: Houston, the Eagle has landed, TX
- Contact:
Re: tag problem
is this the problem?
Once only use of #temp?
Code: Select all
$$('.onceonly').each(function(staticitem) {
staticitem.update('**');
var staticAjax = new Ajax.Updater(staticitem.id,url,{parameters: {item: staticitem.id, property: 'value'} , method : 'post'});
});
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: tag problem
Right idea (sort of) - it's the limitations of the dynamic call.
Although the static call has the same limitations.
Although the static call has the same limitations.
......................Imagine, what you will KNOW tomorrow !
Re: tag problem
Strictly speaking the # in the ID makes it an illegal value This is why I developed my own version of the AJAX updater https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=832. This does away with the #, supports multiple use of elements on a page (assuming you 'uniqeify' the id ) and does not require the use of PHP postback. My index page uses the <interval> value twice, as in this extractbeteljuice wrote:change the temp UNIT id to an 'illegal' value
Code: Select all
<p>The web site uses JPGraph 2.3.4 to realise the graphs, which are updated every <span class="ajax" id="interval_01"></span>.
Realtime observation data in the tables are updated by Cumulus and Ajax every 15 seconds.
All other pages on the site are updated every <span class="ajax" id="interval_02"></span>.</p>
Cheers, Mark
- w5afw
- Posts: 154
- Joined: Thu 29 Jan 2009 8:48 pm
- Weather Station: ws-2315
- Location: Houston, the Eagle has landed, TX
- Contact:
Re: tag problem
thanks, Mark; I will continue to try; also, when I get time, I'll try your template; cheers, lex
-
- Posts: 42
- Joined: Mon 02 Feb 2009 10:25 pm
- Weather Station: WS 1081
- Operating System: windows 10
- Location: Rieti Italy
Re: tag problem
Hey - I just get back from a tour of Europe and get problems in the code
I just took a quick look at your page - it looks OK, but I suspect there may be an issue in the changes you have made.
You have _06#temp & _07#temp twice on the page, so you may well have plain old #temp there more than once too !
You can have multiple occurences of any tag field you want, as long as each is made unique by prefixing with _xx to each, whe xx is the unique value, it can be whatever you want.
My current code has dispensed with the # character for compliance, so I will have to go back a revision to see how it went originally.
The difference between the span classes, is to reduce some of the overhead. Once only is just that, it gets the data once when the page loads, the other, refresh, gest the value and sets up the refresh interval, and unit is the same as static, except it is getting the unit content for the value.
Take a look at pe19.station-weather.co.uk/ajaxindex.htm but I haven't made the latest PHP for the server available yet
I'll have some more time later this week for help if you need it.
I just took a quick look at your page - it looks OK, but I suspect there may be an issue in the changes you have made.
You have _06#temp & _07#temp twice on the page, so you may well have plain old #temp there more than once too !
You can have multiple occurences of any tag field you want, as long as each is made unique by prefixing with _xx to each, whe xx is the unique value, it can be whatever you want.
My current code has dispensed with the # character for compliance, so I will have to go back a revision to see how it went originally.
The difference between the span classes, is to reduce some of the overhead. Once only is just that, it gets the data once when the page loads, the other, refresh, gest the value and sets up the refresh interval, and unit is the same as static, except it is getting the unit content for the value.
Take a look at pe19.station-weather.co.uk/ajaxindex.htm but I haven't made the latest PHP for the server available yet
I'll have some more time later this week for help if you need it.