Alternative ajaxWDwx.js Script v 9.14

I removed the calls for the stats scripting and that did allow your version of the javascript to load properly. Here is the link to the code for stats code:

http://www.php-web-statistik.de/download-english.html

Hope that helps, I know a lot of us use the stats program.

Scott

UPDATE: Just noticed that they are now charging for the download, for now at least I’ve removed this mod totally but still have the almost immediate switch to paused mode and no updates.

Suggestion:

The comfort wording for temperature (Hot, extremely cold, etc) are subjective to what part of the country you live in. Right now, using an un-edited version, my temperature is 25F and it shows “UNCOMFORTABLY COLD”. However, for us in Minnesota, thats pretty darn nice for mid January since it’s been well below zero for weeks. Those words should be able to be set. Could you add them to the settings?

Thanks

Scott

Hi Rainer,

You can add me to the list of successful users. v9.07 seems to be running just fine on my site: http://www.candscaron.com

However, I did struggle a bit at first. This may get a bit long, but here it goes… When I first started using the new script, I noticed the ‘updated xx secs ago’ just kept increasing and the moon image would not load. Using your debug tags, I saw that the script seem to get stuck at ‘in moon’ portion. I started debugging further and found that the following lines were causing the problem:

  if (clientrawextra!=null) {
       set_ajax_obs("ajaxsunrise" ,sunrise.date(uom.timeHM));
     set_ajax_obs("ajaxsunset"  ,sunset.date(uom.timeHM));
     set_ajax_obs("ajaxmoonrise",moonrise.date(uom.timeHM));
     set_ajax_obs("ajaxmoonset" ,moonset.date(uom.timeHM));
  }

If I commented the above lines out, the script ran fine. Next, I checked the sunrise, sunset, moonrise and moonset values. All four of the values were null. These values are calculated using the following: (showing sunrise only, the other 3 are built similarly):

sunrise    = new Date( clientraw[141], clientraw[36]-1, clientraw[35], sunriseWD[0], sunriseWD[1], 0);

I checked my clientraw and clientextra files and I had values for all the above. I just could not figure out why no one else had an issue like mine. However, I finally noticed that MoonriseWD[1] and SunriseWD[1] had values like 56AM and 25PM. Yes, I had my Weather Display set to 12hr format. When the AM and PM values where put into the Date() function, the Date function failed to return a date. This caused my empty values for rise and set times. I changed WD to 24hr format , uncommented the previously commented lines, and the script ran without an issue.

If any one else is have a strange issue, you may want to check your Weather Display time format.

Otherwise, this is a great script and I really appreciate all your efforts in making the setup and configuration so easy.

Also, I did add one tag that I add to my prior version of ajaxWDWx.js. I using the 10minAvg wind speed on my dashborard. I added the following lines. Perhaps, you can add it to a future release:

// 10 minute average wind speed
wind10minavg = parseFloat(clientraw[158]).convertWind();
set_ajax_obs(“ajaxwind10minavg”, wind10minavg.toFixed(dp.Wind) +’ '+ uom.langWind);

–Steve in Southern California

Hi, Rainer

Thanks for doing all this work for us.
Easy to implement thanks to your good documentation in the first post.
I was folowing this, and had some time today, so it is working on my site now.

Jozef

@Jose

I don’t see anything wrong with the ajax-part of the page, but you have PHP-errors. Turn javascript off and error-reporting on and you should see them. First thing you have to do is to correct those errors.

Hi
Are there any chances that it can identify the problem which occurred with me?
I myself certainly do not give advice :frowning:
I stir a little script code in order to look for reasons. Now I wonder if will restore the previous version.
If there are any chances to politely wait. Because I really like the theme :wink:

andretti

Firebug says:

The resource from this URL is not text: http://www.andretti.pl/ajaxWDwx-settings.js

It should be text, try to upload that file again.

Hi Pinto
I just re-send the script to the server.
Is that something has changed?
I see in FF is still the same :frowning:

andretti

I see You and Webster Weather (two sites where it isn’t working) are using version 9.06

The others are using 9.07 and working.
I don’t know if upgrading will help, but I sure should try it.

As I’m only jumping in as of today, I did not test previous versions.

Jozef

Thanks Jozef
I waited for the suggestions Rainer and I restrained myself from updating the script.
But I see that Rainer is busy so I think I would lose nothing if I try to update.
Well, to work :wink:

It works! :slight_smile:
So upgrade to 9.07 improved the performance.
Now restore deleted additional codes.

Thank you for your support;)
Andretti

Guys,
but…where is Rayner? :smiley:

If you ask me, if you see the amount of work an the number of posts to support this script, he needs
some sleep
:wink:

Glad I could help :slight_smile:

Thanks pinto.

I will try this and correct the errors.

Regards

Jose

9.07 solved several of the problems with mine, it still doesn’t reset the seconds since last update count but I haven’t had time to look into it too deep yet. It’s looking good though!

Scott (Webster Weather LIVE)

when looking at

http://www.websterweatherlive.com/ajax-dashboard.php

I see this PHP-error:

Fatal error: Call to undefined function langtrans() 

and you have set in ajaxWDwx-settings

MultilingualSystem = true; // if false activates translation below 

maybe try to change it ?

I think everyone who wants to try this has to make sure you do not have PHP-errors, and after you corrected them try the ajax-part.

Jozef

He’s very busy :oops: … sorry for not answering the posts.
New version soon on it’s way … I’m simplifying the setup of and adding of “ajaxTags”.
It’ll also cut down on the code dramatically.

The testing is going well.

Here a wee example of tag setup in future:[color=brown] tag.add("ajaxtemp" ,temp ,clientraw [ 4] ); tag.add("ajaxbaro" ,baro ,clientraw [ 6] ); tag.add("ajaxrainMon" ,rain ,clientrawextra[484] , function() { this.val = this.val/10; } ); tag.add("ajaxrainTue" ,rain ,clientrawextra[485] , function() { this.val = this.val/10; } ); [/color]
The adding of new tags will be a joy :smiley:

I did mention that it was still a work in process… I was just mentioning that the initial issues were corrected #-o

Scott

Hi guys,

about my issues…it seems that the ajaxWDwx-settings.js file doesn’t overwrite the alternative ajax-dashboard settings although i’ve inserted in the header of top.php file this line:

<script type="text/javascript" src="ajaxWDwx-settings.js"></script>

Why?
Many thanks,

Alessandro

Has anyone else seen this error when trying to Validate with the new Script?

character “@” is not allowed in the value of attribute “id”

Scott

That’s a W3C validation error in ajax-dashboard.php (not in ajaxWDwx.js).
Not to serious … just ignore it.

What is important is that one should be concerned about and html tags and tag nesting.