Updates on Carterlake AJAXed templates

Forum members,

I have looked through the forum but cannot find any solid answers relating to my questions.

The following custom tags amongst others are not being updated with values on my weather page:

%maxtempt%
%mintempt%
%highhumt%
%lowhumt%

Instead they remain on the page with the tags. While others like %maxtemp%, %mintemp%, %highbaro%, %lowbaro% load ok. I have had a look at ajaxWDwx.js, and I think I can see that there is no provision for the values that are not loading. At the moment, I have only FTPed the page onto my web server and not loaded the page onto the web server using WD. But I get practically the same problem anyway when I use WD.

I’d like to load the values possibly using AJAX. Does anyone have any ideas as to what I might be doing wrong. I’m relatively new user of the templates and I am stumped at this point.

The values for the times of min/max temp and humidity aren’t included in clientraw.txt, so the AJAX script isn’t able to update those. You should upload the page through WD so the values will be substituted and display on the page.

AJAX can only update those values that are included in clientraw.txt – you can see which ones are included by using Kevin’s WD parser page at NameBright - Domain Expired – only the conditions shown in the clientraw.txt area are available with the ajaxWDwx.js script.

Best regards,
Ken

Thank you Ken for your quick reply.

I pretty much figured that that would be the problem anyway (ie. values not in clientraw) but I couldn’t understand why I had the same problem when using WD to load the files.

Since my post I have continued trawling the Forum and found the answer by accident from one of your earlier posts. Thus, by attempting to view the highs and Lows on WD hi/lo readings I have found them to be blank. And that’s probably the reason why WD does not load those values too which is what got me worried.

Plus, on my site, I don’t have a weather station yet so hopefully that is definitely why WD does not have those values #-o (I am playing with the templates and preparing my website in readiness for when the weather station arrives.)

But I have still a couple of questions that you may have answers to:

Firstly, I am trying to avoid loading wxlocal using WD because everytime I do, it distorts the page - the weather vaules are displayed in large fonts and the page becomes obscured so that when you open it on a browser you now have to use a scroll bar at the bottom to see the full page. Why?

Secondly, if I am to avoid using WD, and still want to use AJAX to load the values like I think Tom at Carterlake might have done (not sure), how do I do it? Is it easy or will it take a lot of programming. For example, which data file would I use?

Yes, the reason WD isn’t recording the high/low readings and times is because you don’t have a weather station to provide the readings, so WD has no data to provide (except what it gleans from METAR) :slight_smile:

You can see the unsubstituted example page here and the page after substitution here to see the differences. In the unsubstituted page, all the %tags% are the ones not available in clientraw. The tags with ‘real data’ are from the AJAX updates.

Tom is using PHP and his getwx script to read a WD substituted file into a set of PHP variables so he can write them to his PHP pages … that function is not available on .htm/.html or .shtm .shtml pages… only on .php pages. He’d also developed a second instance of ajaxLoader that reads the same wx30.html file so AJAX could update the page at 150 second intervals. The key to either of his methods is to have the wxlocal30.html file uploaded and substituted by WD to wx30.html (so you need a weather station to get the values so WD can do it’s thing).

The page distortion is likely caused by the unsubstituted values for the tags … the %tags% can have long names and cause overflow beyond their normal areas due to the length.

Tom’s getwx/wx30 method, his ajaxLoader2/wx30 method or my own testtags.php method all require some programming beyond ‘out of the box’ … I encourage you to explore the available methods and see if one meets your needs.

Hope this helps…
Best regards,
Ken

That’s great, thank you. I had actually stumbled upon the information about both methods for extended AJAX updates but wasn’t sure. Thanks for confirming that.

I have done some programming in the past, though not web programming, so if it comes to the crunch I think I’ll be able to catch up. But I’ll probably put that on the back burner for now and face more important issues.

Perhaps I can ask you one more question regarding updates using WD:

The page distortion we talked about actually occurs because, for some reason, WD increases the font sizes of the text on the page (please see attached doc). Any ideas why?

BTW, many thanks for providing the AJAXed templates. Excellent work!


wd.zip (120 KB)

kinjiru,

Pardon me for jumping in here but I’m up early this morning and Ken has a couple more hours of beauty rest to go. Actually we’re not real sure that he ever sleeps.

I looked at your screen capture and it appears to be exactly how the template file was designed with the first two columns in a larger font. This is something that you can change by simply changing the template. WD only substitues real values for the tags and does not mess with your html formatting during the process so once you make a change it’ll “stick”. Click on my signature below and you’ll see the direction that I have gone.

Speaking of signatures etc, when you get a chance please update your profile so folks know where you’re at and include a link to your web site even if it’s just under development. That will make it much easier for folks to help when you have questions once your station is up.

Good Luck and you’re going to love this. - Jim

Boy, it sure is a lot easier if you just post the link… :wink:

http://www.metrong.com/weather/

The template looks perfectly normal except…

Thanks Tom and Jim for your help!

The uncheck option has indeed rectified the problem :D. No surprises it had to be something simple as that.

Will definitely update my profile like you said Jim, and I do like the geolocation thing used on your site. Think I might check it out.

Jim, thanks for that… I do sleep, but there’s just so much coding to do :wink:

Kinjiru, I second what Tom and Jim have recommended… put your website URL in your profile. We can generally better help if we can see the live site, even if it’s in development … we’ve all been there with the development cycle. In fact, I think that websites are never ‘finished’… just paused for the next development cycle…

Best regards,
Ken

Also, let me know when you’re officially “live” so I can add you to my list of template users…

(Oh boy, another country!)

Tom, you could add me as AJAX live also.

http://quickskys.com Hollywood, Maryland

–Dave

Thanks Ken, Tom, Jim for your help. I have also updated my profile to reflect my weather site. Still waiting for the weather station though

Also, let me know when you're officially "live" so I can add you to my list of template users....

(Oh boy, another country!)

Tom, sure thing. It was already on my to-do list :slight_smile:

Tom

You can add me to your list too…

http://www.pdx-wx.com Portland, Oregon