title: .toFixed only working on 1 form and not all 3
body: <p>I have a site I'm working on where I have made a javascript calculator and I need all 3 forms in the page to round to 2. I have used toFixed(2) on my first form. The other 2 forms still display all decimal points even though I have used .toFixed(2) on them. Any ideas  </p>
  
  <pre><code>&lt;script type="text/Javascript"&gt;    
  // Begin calculations
  function resetCalc() {
  document.forms[0].elements[1]="";
  }
  
  function  calcRect() {
  if(validNumber(document.getElementById('length'), 'length') == true) {    
      if(validNumber(document.getElementById('width'), 'width') == true) {  
          var length = (document.getElementById('length').value)
          var width = (document.getElementById('width').value)
  
          var prodRect = ( length * width / 9 ) .toFixed(2) 
  
          document.getElementById('ansRect').value = prodRect
          }
      }
  }
  function calcCirc() {
  if(validNumber(document.getElementById('diameter'), 'diameter') == true) {
      var diameter = (document.getElementById('diameter').value)
  
      var prodCirc = (diameter / 2) * (diameter / 2) * 3.14 /9 .toFixed(2)
      document.getElementById('ansCirc').value = prodCirc
      }
  }
  
  function calcTria() {
  if(validNumber(document.getElementById('base'), 'base') == true) {
      if(validNumber(document.getElementById('height'), 'height') == true) {
          var base = (document.getElementById('base').value)
          var height = (document.getElementById('height').value)
  
          var prodTria = (base * .5) * height / 9 .toFixed(2)
          document.getElementById('ansTria').value = prodTria
          }
      }
  }
  // End Calculations
  
  // BEGIN Validate Values entered
  //Requires field that contians value being evaluated
  function validNumber(varInput, fieldName) {
  
  if (varInput.value == null) {
          alert('Please enter a value for the ' + fieldName + ' field');
          varInput.focus();
          return false;
      }
  
  if (IsNumeric(varInput.value) == false) { 
          alert('Please enter only numbers or decimal points in the ' + fieldName  + ' field');
          varInput.focus(); 
          return false;
      } 
  
  return true;
   }
   // END Validation
  
   //  check for valid numeric strings    
  function IsNumeric(strString) {
     var strValidChars = "0123456789.";
     var strChar;
     var blnResult = true;
  
      if (strString.length == 0) return false;
  
     //  test strString consists of valid characters listed above
     for (i = 0; i &lt; strString.length &amp;&amp; blnResult == true; i++)
        {
        strChar = strString.charAt(i);
        if (strValidChars.indexOf(strChar) == -1)
           {
           blnResult = false;
           }
        }
  
     return blnResult;
  }
  //
  &lt;/script&gt;
  </code></pre>
  
  <p>And the html </p>
  
  <pre><code>&lt;form name="sodCalc" id="formEnquire" action=""&gt;
    &lt;div id="ctl00_body_sodCalc1_validationSummarySodCalc" style="color:Red;display:none;"&gt; &lt;/div&gt;
    &lt;p&gt;&lt;strong&gt;For a rectangular shaped area&lt;/strong&gt;&lt;/p&gt;
    &lt;p&gt;
      &lt;label&gt;Length&lt;/label&gt;
      &lt;input name="length" id="length" type="text" tabindex="1" /&gt;
      &lt;label&gt;Width&lt;/label&gt;
      &lt;input name="width" id="width" type="text" tabindex="1" /&gt;
      &lt;label&gt;Result&lt;/label&gt;
      &lt;input type="text" value="0" name="ansRect" id="ansRect" /&gt;
      &lt;br class="clear"/&gt;
      &lt;input type="button" value="Calculate" onclick="calcRect()" name="btnRect" id="btnRect" /&gt;
      &lt;input type="reset" value="Reset" onclick="resetCalc()" name="reset" id="reset" /&gt;
    &lt;/p&gt;
  &lt;/form&gt;
  &lt;form name="sodCalc" id="formEnquire" action=""&gt;
    &lt;div id="ctl00_body_sodCalc1_validationSummarySodCalc" style="color:Red;display:none;"&gt; &lt;/div&gt;
    &lt;p&gt;&lt;strong&gt;For a circle area &lt;/strong&gt;&lt;/p&gt;
    &lt;p&gt;
      &lt;label&gt;Diameter Of Circle&lt;/label&gt;
      &lt;input name="diameter" id="diameter" type="text" tabindex="1" /&gt;
      &lt;label&gt;Result&lt;/label&gt;
      &lt;input type="text" size="6" value="0" name="ansCirc" id="ansCirc" /&gt;
      &lt;br class="clear"/&gt;
      &lt;input type="button" value="Calculate" onclick="calcCirc()" name="btnCirc" id="btnCirc" /&gt;
      &lt;input type="reset" value="Reset" onclick="resetCalc()" name="reset" id="reset" /&gt;
  `  &lt;/p&gt;
  &lt;/form&gt;
  &lt;form name="sodCalc" id="formEnquire" action=""&gt;
    &lt;div id="ctl00_body_sodCalc1_validationSummarySodCalc" style="color:Red;display:none;"&gt; &lt;/div&gt;
    &lt;p&gt;&lt;strong&gt;For a triangle area &lt;/strong&gt;&lt;/p&gt;
    &lt;p&gt;
      &lt;label&gt;Base&lt;/label&gt;
      &lt;input name="base" id="base" type="text" tabindex="1" /&gt;
      &lt;label&gt;Height&lt;/label&gt;
      &lt;input name="height" id="height" type="text" tabindex="1" /&gt;
      &lt;label&gt;Result&lt;/label&gt;
      &lt;input type="text" size="6" value="0" name="ansTria" id="ansTria" /&gt;
      &lt;br class="clear"/&gt;
      &lt;input type="button" value="Calculate" onclick="calcTria()" name="btnTria" id="btnTria" /&gt;
      &lt;input type="reset" value="Reset" onclick="resetCalc()" name="reset" id="reset" /&gt;
    &lt;/p&gt;
  &lt;/form&gt;
  </code></pre>