Author Topic: having issue with code , sometimes does not work right ..  (Read 1111 times)

0 Members and 1 Guest are viewing this topic.

Offline Total

  • Web dude ..
  • Senior Contributor
  • ****
  • Posts: 151
    • weather station ..
The total rain for the month sometimes reads 0.1 see picture ..  [ You are not allowed to view attachments ]  


if it is working  [ You are not allowed to view attachments ]

the code is
Code: [Select]
/script> . </font>       
           
           
 ... <font face="Arial">This month total rain in inches :</font> <font face="Arial">
      <script language="javascript">



// JavaScript Document
   var MR = ^vxv129^ ;
   var rainmo = MR*0.03937007874015748;
   document.write(rainmo.toFixed(1));
   

</script> . </font>             

Ideas ? thanks //
« Last Edit: July 22, 2017, 05:31:51 PM by Total »

Offline Total

  • Web dude ..
  • Senior Contributor
  • ****
  • Posts: 151
    • weather station ..
Re: having issue with code , sometimes does not work right ..
« Reply #1 on: July 29, 2017, 11:22:15 PM »
Hello All : That problem fixed itself , can a java expert help me out , On my web page below the bear http://www.strutherslakeweather.ca/, How in java can you make those values center , or all line up to the left ? Here is the code

Code: [Select]
at</big></font></strong><br>
              <font color="#0000ff"> ^vst143^ on ^vst142^</font></font><p><font size="5" color="#0000ff" face="Arial"><strong>Temperature&nbsp;&nbsp; </strong><b>^vxv007^^uni007^<br></b></font></p><p align="center"><font color="#0000ff" face="Arial"><b><font face="Arial">Today's rain in 10 Th's</font></b><b><font face="Arial"> </font></b></font><font size="5" color="#0000ff" face="Arial"><b><font size="+1" face="Arial">:</font> <font face="Arial">
      <script language="javascript">



// JavaScript Document
   var R = ^vxv121^ ;
   var rainin = R*0.03937007874015748;
   document.write(rainin.toFixed(1));
   

</script> . </font></b></font><font color="#0000ff" face="Arial"><b>


<b><font color="#000099" face="Arial">Total yearly rain in inches</font></b></b></font><font size="5" color="#0000ff" face="Arial"><b><b><font color="#000099"> <font face="Arial">
      <script language="javascript">



// JavaScript Document
   var TR = ^vxv009^ ;
   var totalrainin = TR*0.03937007874015748;
   document.write(totalrainin.toFixed(1));
   
   </script> </font>
   
   
   
   </font></b></b></font><font color="#0000ff" face="Arial"><b><b><font color="#000099"><font face="Arial">Month rain in inches:</font></font></b></b></font><font size="5" color="#0000ff" face="Arial"><b><b><font color="#000099"> <font face="Arial">
   <script language="javascript">

   
   // JavaScript Document
      var MR = ^vxv129^ ;
      var rainmo = MR*0.03937007874015748;
      document.write(rainmo.toFixed(1));
     
   
</script>  </font> 
   
 
   
</font></b></b></font><font color="#0000ff" face="Arial"><b><b><font color="#000099"><font face="Arial">Humidex :</font> </font></b><font face="Arial"><b><font color="#000099">
      °C</font></b></font></b></font><font size="5" color="#0000ff" face="Arial"><b><font face="Arial"><b><font color="#000099">&nbsp;</font></b><script language="javascript">



// JavaScript Document
  var T = ^vxv007^ ;
  var H = ^vxv005^ ;
  var dewPoint = Math.pow((H/100), 1 / 8 ) * (112 + 0.9 * T) + 0.1 * T - 112;
  var expIndex = 5417.753 * ((1 / 273.16) - (1 / (dewPoint + 273.16)));
  result = T + 0.5555 * (6.11 * Math.exp(expIndex) - 10);
  if (result < T)
     { result = T;
   }
document.write(Math.ceil(result ));
   </script> </font></b></font></p><font size="5" color="#0000ff" face="Arial"><b>

          </b></font></td>
          <td bordercolor="#000000" style="border: thin solid rgb(0, 0,
            0);">
            <p align="center"><font size="5" color="#0000ff" face="Arial"><b><br>
                </b></font></p>
« Last Edit: July 29, 2017, 11:23:47 PM by Total »

Offline Total

  • Web dude ..
  • Senior Contributor
  • ****
  • Posts: 151
    • weather station ..
Re: having issue with code , sometimes does not work right ..
« Reply #2 on: July 30, 2017, 11:19:05 PM »
I figured it out - the internet is a wonderful thing ...

 

anything