AJAX Updating Problem

I am setting up the templates with Ajax. My main page, http://frankpinkston.com/weather/wx10.html is not updating. I have uploaded the two ajax javascript js files. Clientraw is in the same diorectory as http://frankpinkston.com/weather/wx10.html. How can I troubleshoot this?

Thanks

Frank

The ajaxWDwx.js JavaScript is expecting the clientraw.txt file to be in the document root of the website…

Just change ajaxWDwx.js from

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

to

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

and it should work fine :slight_smile:

Best regards,
Ken

I see that ktrue is the last to respond to this thread but I do not see the response he entered. Any help would be appreciated.

Ken

Thanks! That fixed the main page. I knew it was something simple.

However, the gizmo is not displaying data. The gizmo rotates from temp to humidity to depoint etc but no data is displayed. See http://frankpinkston.com/weather/wx13.html

Thanks for your help and the superb scripts

I see what you mean, Frank.

I think you need to make a couple of corrections to make it work on your home page and other pages in your site.

First, in c:\wdisplay\webfiles\wxlocal.html change the areas highlighted in red below to the contents of the code box shown below.

[color=red][/color] [color=red]
<!-- ##### end AJAX mods ##### -->

[/color]

<!-- ##### Note: AJAX mods are also included around many WD tags with data in clientraw.txt with -->
<!-- <span class="ajax" id="ajax..."></span> tags .. see page below for details                  -->
<!-- ##### end AJAX mods ##### -->
<title>Frank's Weather Station</title>
<meta name="Frank's Weather" content="Personal weather station." />

<meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="weather-screen.css" media="screen" title="screen" />
<link rel="stylesheet" type="text/css" href="weather-print.css" media="print" /></head>

<<body onLoad=“ajaxLoader(‘clientraw.txt’+new Date());”> >

to

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US">
  <head>
    <!-- ##### start AJAX mods ##### -->
    <script type="text/javascript" src="ajaxWDwx.js"></script>
    <!-- AJAX updates by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
    <script type="text/javascript">
    <!--
    useKnots = false; // set =true; to force use of knots as wind speed
    ajax_set_units('E'); // use 'E' for USA(english) units or 'M' for Metric
    //-->
    </script>

    <!-- ##### Note: AJAX mods are also included around many WD tags with data in clientraw.txt with -->
    <!-- <span class="ajax" id="ajax..."></span> tags .. see page below for details                  -->
    <!-- ##### end AJAX mods ##### -->

<!-- ##### CHANGE  title to your site ##### -->

    <title>Frank's Weather Station</title>

<!-- ##### CHANGE  description to your site ##### -->

    <meta name="Frank's Weather" content="Personal weather station." />

    <meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-1" />
    <link rel="stylesheet" type="text/css" href="weather-screen.css" media="screen" title="screen" />
    <link rel="stylesheet" type="text/css" href="weather-print.css" media="print" />
  </head>

  <body>

Then change ajaxWDwx.js from

var ajaxLoaderInBody = true; // set to true if you have <body onload="ajaxLoader(..."

to

var ajaxLoaderInBody = false; // set to true if you have <body onload="ajaxLoader(..."

then the other pages in the site should perform correctly.

Best regards,
Ken

Thanks Ken That fixed the second problem. I appreciate your help. I wonder why your responses are marked as spam? You certainly are not a spammer !

I may bug you more. I seem to have an IE8 not always showing update “green”

Thanks again

Frank

On the ‘spammer’ front, I think Chris (administrator) has that straightened out by removing an anti-spam mod that was misbehaving :slight_smile:

IE8 is very sensitive to correct (valid) HTML … your wx10.html page still has extra tags in it (marked in red in the post above) … replace the top of your wxlocal10.html with the new top section and it should have IE8 performing correctly on that page.

Which other pages have the “IE8-not-showing-green” issue?

Best regards,
Ken

Ken,
Cleaning up the code as you suggested fixed the problem. I had the IE8 “compatibility mode” ON. With this - turned off it works fine. I still have the compatibility mode issue with the dashboard http://frankpinkston.com/weather/ajax-dashboard.php but I am making good progress. Thanks again for your generous help.

Frank

I am having an issue with the updating of ajax arrow for the Current Temperature after updating to IE8 (should have known better!).

It seems, as far as I can tell, that the only issue right now is the update arrow under the Current Temperature is not appearing on my index page. I am getting a small yellow box where the temp up or down should appear.

Webpage: www.carolinastormwatch.com/index.php

Any help would be appreciated as always!

Tom

I’m not seeing the yellow box you cited in either FF or IE8… I do see that the /ajax-images/falling.gif image returns

Not Found
The requested URL /ajax-images/falling.gif was not found on this server.

Upload falling.gif to the ajax-images/ directory to fix that.

Best regards,
Ken

Thanks Ken,

Never had a problem until I updated to IE8 though which is odd. The arrows all seemed to work I thought.

Will check it out to make sure they are there.

Many thanks!

Tom

Problem Solved!

For some reason I seem to be having this problem too. I used to not have an updating issue until just recently and I’m not sure if it is because of some changes I made and screwed something up or if a bug is introducing itself.

What I have noticed is that in IE8 the dashboard doesn’t update regularly unless I manually update by refreshing with F5 and I lost the green flash. The gizmo seems fine but the Dashboard is the issue. I’m hoping a fresh set of eyes might see what I am missing.

www.gigharborweather.com

Thanks in advance.
Brian

Just an update.

I have tried it with FF and seems to work but not with IE 8 and 7. I’m so frustrated. I have know idea what I did wrong.

Thanks again
Brian

I’m seeing ‘green flash’ updates on FF3.5, IE8, IE8(compatibility mode=IE7) just fine. The wind speed and update date/time are flashing green every 5 seconds.

Can you describe what you’re seeing in more detail… I can’t seem to reproduce your issue.

Best regards,
Ken

I found the problem with a Java script scrolling marquee that I inserted in both my index.php and wxindex.php.
I removed the code and everything seems fine now.

Thanks Ken for looking.

Sincerely
Brian

JavaScript is a tricky beast… one script error on the page, and all scripts on the page stop working (or don’t even start up). Firefox with FireBug extension is a good way to find JavaScript errors :slight_smile:

Best regards,
Ken