A fairly simple question - Ajax ID Tags

Do each of the Ajax ID Tags correlate directly to a WD Tag?
e.g. in this line

Temperature: %temp%


ajaxtemp correlates to the standard WD %temp%

I have a list of the Ajax Tgas and one of the WD Tags but is here a cross reference list anywhere please?

Sorry, I’ve not seen a correlation of the two lists. When the AJAX tag names were created, they used similar names, but they are not necessarily identical (minus the ‘ajax’) to the WD %tagname%

Best regards,
Ken

Perhaps I’m asking the wrong question.
In the example “Temperature: %temp%
how do I know to use %temp%

Sorry if I seem a bit thick or misunderstand the use here.

No apology needed … it is a good question :slight_smile:

As I said, there is no direct correlation between the ‘ajax…’ and %…% names that I know of.

You can see the markup on the pages with the corresponding WD tags in the Original Carterlake+AJAX HTML template set. I think the one for wxlocal.html will have the most use for you as it combines direct markup with the AJAX span tags and the %WDtags% in the HTML.

Hope this helps…
Best regards,
Ken

The way I understand it by looking at the file that generates the ajax script, the live updating data comes from the clientraw file that gets parsed by the ajaxwdwx.js file. %temp%, (and in your case, it should likely be $temp if you’re using the saratoga scripts) is coming from the testtags.php file. So if you need live updating data on the web page, you need to see if an ajax tag is being created from the clientraw.txt file. And with the newer ajax script, it’s likely you can get it from the other clientxxx files (clientrawdaily, clientrawhourly, etc). Don’t quote me on that. The span class you refer to indicates whether or not you are going to get the data from the ajaxwdwx.js script. So what happens is that before the first update, the data you see is from the testtags.php file that gets generated on your interval (whether that be five minutes, 15, whatever). So, what I have in my script is this:

><span class="ajax" id="ajaxtemp" style="font-size:30px">
		          <?php echo strip_units($temperature) . $uomTemp; ?>

The span class ajax tells the html to use a specific ‘class’, which in this case would be an ajax field. The ID is the name of the ajax tag as rendered by the js file.

If you don’t have something to pre-populate the field in the time between initial page load and the first ajax update, then that field would be blank until the update. Hence the need for the second line. The $temperature variable is taken directly from the testtags.php file.

So, the short answer? No. But, if you wanted to correct that for your own reference, you’d have to edit the testtags.txt file, and the ajax-dashboard.php file to use the new variables.

Sorry to be so long winded.

Thanks to both of you for your responses.
I think that I’m getting there.
I don’t use PHP as I design my own site using fairly straight forward HTML with Server Side includes that result in SHTM files.
My main site is in the English language but as I live in Spain I want to provide a Spanish langage version of my pages. Standard WD tags give me a translation problem with some tags so I hope to use the Ajax tags to create my own customised Spanish interpretations.
Thanks again for the responses and advice - I aprreciate it.
You can see my results so far at www.kenandglen.com