AJAX Weather Script not updating online.

Hello, I have finally decided to give the AJAX weather script thing a try. Now while I know this is for WD question… the script is not updating the data because clientraw.txt is not updating.
I have done the settings right to get clientraw to upload just fine but the data seems about the same.

I refresh the clientraw.txt on my site a couple times and it seems like something is changing (text in the line moves) but when i vew the script no temperature changes or anything.

What im guessing is… WD in general only receives data from the station every 2 minutes or such… yet my station is in wired mode (La Crosse WS2310) which is getting data every 2-3 seconds.

Im wondering… do I have to change some settings on WD to get the data faster so it can send it every 3 seconds on Clientraw?

Im confused :oops:

http://wncw.net/beta/ajax-dashboard-testpage.php

It would be much easier for someone to help you if you could reveal the URL of the not working webpage.

Sorry… I remembered too late as you had already replied.

I see there’s an option to create + upload the clientraw.txt file on the “Internet File Creation & Uploads” but when I go to the file options… It only gives options for the “Create File” in minutes… I thought it was supposed to update in seconds??

your clientraw is updating…

http://wncw.net/beta/clientraw.txt

AH… So I dont have to mess with the “File Creation & Upload” section? as long as its enabled in the “Web files/Web page/ Real time…” options??

If so then it must be a script error… can this be moved to the “Creating Weather Websites” forum then? sorry :oops:

If you want it to update fast uncheck that option and set up realtimeftp, see FAQ

Okay… I’ve set everything up.

Clientraw.txt is updating as it should.
Even testtags.php so the demo works is uploaded.
All files seem to be ready to work (the demo)

Yet all .php which are taking in the Clientraw.txt is not updating… The text color does turn green once after I refresh… but no data changes.
So im left with the page saying
“Updated: @ 10/21/2008 10:20:51am - updated 132 sec ago”

And that 10:20 update was when I manually force updated and uploaded the clientraw.txt through the File Creation & Upload, yet clientraw.txt alone is updating right now without me doing a thing.

What did I do wrong?
http://wncw.net/beta/ajax-dashboard-testpage.php?
http://wncw.net/beta/clientraw.txt

That 10:20 clientraw is this one http://wncw.net/clientraw.txt your code must be pointing to it instead of the /beta one.

.< :oops: :oops:

I thought I had checked everything and i missed this 8O

Thanks alot! Such an easy problem #-o

Just a few more questions on the script… (if someone knows how it all works :P) before I actually put it on my real site.
First.

The
24-hr difference
10.8

Hi,

There are two files that update weather info on the dashboard:

  1. testtags.php (which is uploaded by WD from c:\wdisplay\webfiles\testtags.txt ) and
  2. clientraw.txt (which is updated by WD) and used for the AJAX conditions updates.

Since you installed the dashboard in a /beta folder on your website, it makes it just a bit more complicated to do the setup.

Your clientraw.txt appears to be updating at the document root of your website, so your ajaxWDwx.js should have in it

var clientrawFile = '/clientraw.txt'; // location of clientraw.txt relative to this page on website

(which it does), so the AJAX updates are working.

Not all of the weather conditions values on the Dashboard are available in clientraw.txt, so the rest of the values depend on regular uploads of testtags.php … your /beta/testtags.php hasn’t updated since

$time = “10:44 AM”; // current time
$date = “10/21/08”; // current date
(viewable at wncw.net - wncw Lähteet ja tiedot. ), and that’s why the temps appear wrong … they are because the testtags.php is not updating, so it’s showing ‘old’ conditions on the dashboard. Use the WD Control Panel, Internet File Creation, Setup page#2 TAB, file#29 (special custom file convers.) to setup a schedule to update the testtags.php on your site.

BTW… you can see which variables are updated by AJAX on the dashboard by viewing

only the red-underlined data points are updated by AJAX from clientraw.txt … the remaining ones are all from testtags.php

Best regards,
Ken

:oops: Thank you!! Got it fixed. I appreciate it. :smiley:

One more concern about a problem I have. #-o

I added ajaxtemp2 to the javascript code (as i read somewhere that i could do that) to add an additional temperature reading on the same page.

The place i added it was
//Temperature
temp = convertTemp(clientraw[4]);
set_ajax_obs(“ajaxtemp”, temp.toFixed(1) + uomTemp);
set_ajax_obs(“ajaxtemp2”, temp.toFixed(1) + uomTemp);
set_ajax_obs(“ajaxbigtemp”,temp.toFixed(0) + uomTemp);
in ajaxWDwx.js

Anyway, that actually works just fine in Opera, Firefox… but in IE… when you first load the page… everything loads fine (see screenshots below) but after a second or two… the temperature appears where i set ajaxtemp2 to appear… and the table below it… is gone.

First screenshot is where everything but the ajaxtemp2 reading comes up… the table below is fine.
http://i34.tinypic.com/14c4lfl.jpg

Second screenshot is only a few seconds later when ajaxtemp2 reading appears but the table below is gone.
http://i37.tinypic.com/2m61s79.jpg

I’m wondering if there’s a solution or if its just not possible for it to work like this on IE, since Opera and Firefox are fine.
I was hoping to add more things in the future or have double readings… if it worked out… that is why im wondering.

Thanks 8)

Link in case:
Site - http://wncw.net

I think you omitted the closing on the

<span class="ajax" id="ajaxtemp2" style="font-size:22px">
<font color="#009E9E" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="+1">&nbsp;</font>
<p></p>

… it should probably read

<span class="ajax" id="ajaxtemp2" style="font-size:22px">
<font color="#009E9E" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="+1">&nbsp;</font></span>
<p></p>

With the unclosed for id=ajaxtemp2 , everything after that (until the next ) will have the innerHtml rewritten.

You added the set_ajax_obs for ajaxtemp2 just fine … add the closing in your page and it should work just fine :slight_smile:

Best regards,
Ken

Wow… thank you so much, I keep thinking it’s going to be a difficult fix but its really easy mistakes #-o

thanks!! :smiley: