Hi again Rainer
I am using the AJAX DASHBOARD ADDITIONS as shown in the 1st page of this thread
but it dont seem to keep up with the conditions on my dashboard, the wind speed is never
the same
When i added it to the ajaxWDwx file I left out the php tags but only because non of
the other functions in there had them
for example
//Windspeed ...
wind = convertWind(clientraw[2]);
beaufortnum = ajax_get_beaufort_number(clientraw[2]);
set_ajax_obs("ajaxbeaufortnum",beaufortnum);
set_ajax_obs("ajaxbeaufort",langBeaufort[beaufortnum]);
//Pressure...
pressure = convertBaro(clientraw[6]);
set_ajax_obs("ajaxbaro",pressure.toFixed(dpBaro) + uomBaro);
pressuretrend = convertBaro(clientraw[50]);
pressuretrend = pressuretrend.toFixed(dpBaro+1);
if (pressuretrend > 0.0) {pressuretrend = '+' + pressuretrend; } // add '+' to rate
set_ajax_obs("ajaxbarotrend",pressuretrend + uomBaro);
set_ajax_obs("ajaxbaroarrow",
ajax_genarrow(pressure, pressure-pressuretrend, '',
langBaroRising+uomBaro+langBaroPerHour,
langBaroFalling+uomBaro+langBaroPerHour,2)
);
set_ajax_obs("ajaxbarotrendtext",ajax_get_barotrend(clientraw[50]));
pressuremin = convertBaro(clientraw[132]);
set_ajax_obs("ajaxbaromin",pressuremin.toFixed(dpBaro) + uomBaro);
pressuremax = convertBaro(clientraw[131]);
set_ajax_obs("ajaxbaromax",pressuremax.toFixed(dpBaro) + uomBaro);
Your code but with out the <?php and at the end ?> do i really need to included them in the ajax file?
// Cloud Height
stationAlt = 0; // your station altitude in meters if you want ASL (meters = ft / 3.2808399)
temp = clientraw[ 4];
dewp = clientraw[72];
cloudheight = Math.max(0,(temp-dewp)/0.00802)*1.0 + stationAlt; // in meters
altitude = (useunits=="E") ? Math.round(cloudheight*3.2808399) : Math.round(cloudheight);
above = (stationAlt>0)? ' ASL' : ' AGL';
cloudText = altitude.toString() + uomHeight + above;
param = '?uom=' + useunits + '&alt=' + altitude + '&alti=' + uomHeight + '&wind=' + uomWind;
set_ajax_obs("ajaxcloudheightimg"
,'<img src="cloud-base.php' + param
+ '" alt="' + cloudText
+ '" title="' + cloudText
+ '" width="100" height="200" hspace="0" vspace="0" align="" border="0" style="" />');
Also to include it in the dashboard i had to leave out the <?php and the ?> again cause it killed the whole thing lol