I'm at a loss to explain what I am seeing on my website. The displayed website shows Today's rainfall at "0.12" and Yesterday's rainfall at "0.12". However, when I view the source code in my browser Today's rainfall shows "0.00" and Yesterday's rainfall shows "0.12". We actually had 0.12 inches of rain yesterday. Why then, does Today's rainfall show as also being 0.12 inches?
I've attached the "view source" results and the actual code for that section of the template.
View Source:
<td valign="middle"><table width="166" border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="data1">Rain Today:</td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrain">
0.00 in </span>
</td>
</tr>
<tr>
<td class="data1">Rain Rate (/hr):</td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrainratehr">
0.001 in </span>
</td>
</tr>
<tr>
<td class="data1" nowrap="nowrap">Rain Yesterday: </td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrainydy">
0.12 in </span>
</td>
</tr>
<tr>
<td class="data1">This Month:</td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrainmo">
0.21 in </span>
</td>
</tr>
<tr>
<td class="data1" nowrap="nowrap">Season Total:</td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrainyr">
0.21 in </span>
</td>
</tr>
<tr>
<td class="data1" colspan="2">
1 day since last rain. </td>
</tr>
</table>
</td>
Actual Code:
<?php } else { // display Rain ?>
<tr>
<td class="data1"><?php langtrans('Rain Today'); ?>:</td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrain">
<?php echo strip_units($dayrn) . $uomRain; ?>
</span>
</td>
</tr>
<tr>
<td class="data1"><?php langtrans('Rain Rate'); ?> (<?php echo $uomPerHour; ?>):</td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrainratehr">
<?php echo strip_units($currentrainratehr) . $uomRain; ?>
</span>
</td>
</tr>
<?php if(isset($yesterdayrain)) { ?>
<tr>
<td class="data1" nowrap="nowrap"><?php langtrans('Rain Yesterday') ?>: </td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrainydy">
<?php echo strip_units($yesterdayrain) . $uomRain; ?>
</span>
</td>
</tr>
<?php } // end $yesterdayrain ?>
<?php if (isset($vpstormrain)) { // Storm Rain is a Davis VP thing ?>
<tr>
<td class="data1" nowrap="nowrap"><?php langtrans('Storm Rain'); ?>: </td>
<td style="text-align: right;" class="data1">
<?php echo strip_units($vpstormrain).$uomRain; ?>
</td>
</tr>
<?php } // end of DavisVP specific variable ?>
<tr>
<td class="data1"><?php langtrans('This Month'); ?>:</td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrainmo">
<?php echo strip_units($monthrn) . $uomRain; ?>
</span>
</td>
</tr>
<tr>
<td class="data1" nowrap="nowrap"><?php langtrans('Season Total'); ?>:</td>
<td style="text-align: right;" class="data1">
<span class="ajax" id="ajaxrainyr">
<?php echo strip_units($yearrn) . $uomRain; ?>
</span>
</td>
</tr>