Author Topic: WD + carterlake + AJAX templates  (Read 3331 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8714
  • Saratoga, CA, USA Weather - free PHP scripts
WD + carterlake + AJAX templates
« on: December 15, 2006, 03:43:56 PM »
With Tom's permission, I've used his template set and added AJAX functionality to each page. The main page (wxlocal.html) has AJAX updated conditions throughout the page. The secondary pages (wxlocal[2..9].html) have an AJAX driven gizmo in the top right of the page. The gizmo will rotate the display of current conditions.

New users to the carterlake templates can unpack the zip file, and follow Tom's readme.doc file to get their new site running with the AJAXed templates. For current users of the carterlake templates, a set of detailed instructions is included to allow you to refit the AJAX mods into your existing template set.

Included with the package are a set of wind direction icons, rising and falling arrows, and a set of weather condition icons. Thanks to Larry at for his permission to redistribute his weather condition icons from his PHP Weather sticker software.  

The functions have been tested with IE6-SP2, IE7, Firefox 2.0, Opera 8, Netscape 7 and seem to work ok and as a bonus, it validates to XHTML-1.0 Transitional at

The new ajaxWDwx.js JavaScript supports both US(English) and Metric units (via a simple configuration change). Settings available are
Code: [Select]
// -- begin settings --------------------------------------------------------------------------
var flashcolor = '#00CC00'; // color to flash for changed observations RGB
var flashtime  = 2000;    // miliseconds to keep flash color on (2000 = 2 seconds);
var reloadTime = 5000;      // reload AJAX conditions every 5 seconds (= 5000 ms)
var clientrawFile = '/clientraw.txt'; // location of clientraw.txt relative to this page on website
var ajaxLoaderInBody = false; // set to true if you have <body onload="ajaxLoader(..."
var imagedir = './ajax-images';  // place for wind arrows, rising/falling arrows, etc.
var useunits = 'E';         // 'E'=USA(English) or 'M'=Metric
var useKnots = false;       // set to true to use wind speed in Knots (otherwise
// wind in km/hr for Metric or mph for English will be used.
var showUnits = true;       //  set to false if no units are to be displayed
// -- end of settings -------------------------------------------------------------------------

See for more info and to download the package .zip file

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