Author Topic: ajax vws scripts  (Read 3260 times)

0 Members and 1 Guest are viewing this topic.

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
ajax vws scripts
« on: December 20, 2008, 11:21:00 AM »
I downloaded the full script zip file.  With the thought that I would get one of the templates working standalone, then simply plunk some tags into my existing templates.  So I uploaded everything, and had vws turn the usa-V2.htx into a file called ajaxtest.php  ( also tried .htm)

I have always uploaded the wflash files for some reason.

Anyway it does not seem to be working like the demo on Ken's site.  Any thoughts?

Thanks
Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: ajax vws scripts
« Reply #1 on: December 20, 2008, 11:32:06 AM »
Hi Andrew,

The ajaxVWSwxf.js AJAX script is expecting to see your WeatherFlash installation in /wflash/ directory from the root of your website .. if that's not the name of the directory for the WeatherFlash files, then you'll need to change this code in ajaxVWSwxf.js to point to the location of the WF files
Code: [Select]
var wflashDir = '/wflash/';   // URL for directory for WeatherFlash relative to this script with
//                               trailing '/'.  In Root = '/', in /wflash = '/wflash/'

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: ajax vws scripts
« Reply #2 on: December 20, 2008, 11:36:43 AM »
Thanks Ken, missed a pretty big step, "Wealthflash installed on your site"  I read right past that and just made sure the vws weather flash files were there.

Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: ajax vws scripts
« Reply #3 on: December 20, 2008, 12:15:54 PM »
I think I have it working now.  Are there some strange conversions going on in the background?

My current console display temp is -12.7 yet the ajax page is/was saying -13.0
Also my high for the day is actually -20.2 at 8:03am, yet the ajax page is saying -20.7 at 8:03am

thanks,
Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: ajax vws scripts
« Reply #4 on: December 20, 2008, 12:49:08 PM »
Hi Andrew,

You might try a modified version of the ajaxVWSwxf.js script I'd developed for Ann-Marie which uses a better rounding function.

Download from http://saratoga-weather.org/AJAX/VWS/ajaxVWSwxfR.js and save to replace your ajaxVWSwxf.js script.

Let me know if that works better for you.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: ajax vws scripts
« Reply #5 on: December 20, 2008, 01:07:30 PM »
As usual Ken thanks for the super help.

I actually found what I thought was the "bad" rounding calc. there was a .57 in the f to c formula that I was going to change to .5555555556, but since you already did the work, I will just use this new js file.

Now I can go in a put selected ajax tags in my page... as soon as the baby goes to sleep.

thanks again
Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: ajax vws scripts
« Reply #6 on: December 21, 2008, 02:08:45 PM »
I am now fully AJAX'd.  Only took about 5 minutes to retag my own template once I finished playing with setup and tests.  Awesome. I am sorry I avoided trying it for so long.    I also went with FLING for my wflash uploads, VWS was just churning too much, and it was affecting my other uploads.

Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: ajax vws scripts
« Reply #7 on: December 21, 2008, 02:30:42 PM »
Cool!  I'm glad you found the retagging fairly painless :)

Enjoy your AJAX enabled conditions display!

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Mark / Ohio

  • Live from Mars!
  • Forecaster
  • *****
  • Posts: 2511
    • Fairfield County Weather
Re: ajax vws scripts
« Reply #8 on: December 21, 2008, 08:22:11 PM »
Ken,

Is there a simple way that I'm overlooking to round the temperature and wind readings to whole numbers rather then tenths?

So far I have not found a way to do it within VWS.  The "precision" settings do not seem to effect the Weather Flash data output.
Mark 
2002 Davis VP I Wireless, WeatherLink (Serial), GRLevel3, VirtualVP, StartWatch, Weather Display, Windows 10


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: ajax vws scripts
« Reply #9 on: December 21, 2008, 09:05:57 PM »
Hi Mark,

The ajaxVWSwxf.js script has a series of convertName...() functions that process the WeatherFlash variables .. you'd need to adjust those routines (which use varying methods) to have a rounding you'd like .. I'm sorry there wasn't a universal setting made in the code for picking decimal places for specific variables.

You'd probably find it easer to modify the ajaxVWSwxfR.js script (the one with improved rounding) :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Mark / Ohio

  • Live from Mars!
  • Forecaster
  • *****
  • Posts: 2511
    • Fairfield County Weather
Re: ajax vws scripts
« Reply #10 on: December 21, 2008, 09:12:17 PM »
Thanks Ken.  When I get a chance I dig a little deeper in those files and see how much trouble I can get into.   ;)
Mark 
2002 Davis VP I Wireless, WeatherLink (Serial), GRLevel3, VirtualVP, StartWatch, Weather Display, Windows 10


 

anything