title: How do I reset my radio button values when "clear form" is clicked?
body: <p>When I hit "clear form" the Total updates to 0.00 but the each radio button value is not reset to 0.00 within the form. Everything looks like it cleared but the added values are still with in the form. Is there a way to reset all radio button values to 0.00 when I click clear form? Right now they only clear when I refresh the page.  </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
    var prices = new Object();
      function updateTotal () {
          var total = 0.00;
          for (var price in prices) {
              total += parseInt(prices[price]);
          }
          document.getElementById("total").value = total;   // Add the id "total" to the input field
      }
  
  function doClear()
          {
              document.CustomerForm.customer.value = "";
              document.CustomerForm.address.value = "";
              document.CustomerForm.city.value = "";
              document.CustomerForm.state.options.selectedIndex = "PA";
              document.CustomerForm.zip.value = "";
              document.CustomerForm.phone.value = "";
              document.CustomerForm.email.value = "";
              document.CustomerForm.total.value = 0.00;
  
  
  
              document.OrderForm.tower[0].checked = false;
              document.OrderForm.tower[1].checked = false;
              document.OrderForm.tower[2].checked = false;
  
              document.OrderForm.monitor[0].checked = false;
              document.OrderForm.monitor[1].checked = false;
              document.OrderForm.monitor[2].checked = false;
  
              document.OrderForm.printer[0].checked = false;
              document.OrderForm.printer[1].checked = false;
              document.OrderForm.printer[2].checked = false;
  
              return;
          }
  &lt;/script&gt;
  
  
  
  &lt;body onLoad = "startup()" &gt;  
  &lt;h1 align="center"&gt;Computer System Order Form&lt;/h1&gt;
  &lt;!- TODO: implement the order form here--&gt; 
  &lt;table border="black" cellpadding="15px" align="center"&gt;        
      &lt;tr&gt;
          &lt;td&gt;
              &lt;table cellpadding="15px"&gt;
              &lt;form name="OrderForm"&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                         &lt;h4&gt;Computer Case Style:&lt;/h4&gt;
                          &lt;p&gt;
                          &lt;input type="radio" name="tower" value="500.00" onChange="javascript:prices['tower'] = this.value; updateTotal();" onClick="changeBackground1(this.value);" id="case1" /&gt;&lt;label for="case1"&gt;Desktop Case ($500.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;input type="radio" name="tower" value="600.00" onChange="javascript:prices['tower'] = this.value; updateTotal();" onClick="changeBackground1(this.value);" id="case2" /&gt;&lt;label for="case2"&gt;Mini-Tower Case ($600.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;input type="radio" name="tower" value="700.00" onChange="javascript:prices['tower'] = this.value; updateTotal();" onClick="changeBackground1(this.value);" id="case3" /&gt;&lt;label for="case3"&gt;Full-Tower Case ($700.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;/p&gt;
                      &lt;/td&gt;
  
                      &lt;td&gt;&lt;img name="casepic" src="case500.jpg" width="125" height="125" id="casepicture"&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;h4&gt;Computer Monitor:&lt;/h4&gt;
                          &lt;p&gt;
                          &lt;input type="radio" name="monitor" value="250.00" onChange="javascript:prices['monitor'] = this.value; updateTotal();" onClick="changeBackground2(this.value);" id="monitor1" /&gt;&lt;label for="monitor1"&gt;17" LCD Flat Screen ($250.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;input type="radio" name="monitor" value="300.00" onChange="javascript:prices['monitor'] = this.value; updateTotal();" onClick="changeBackground2(this.value);" id="monitor2" /&gt;&lt;label for="monitor2"&gt;19" LCD Flat Screen ($300.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;input type="radio" name="monitor" value="350.00" onChange="javascript:prices['monitor'] = this.value; updateTotal();" onClick="changeBackground2(this.value);" id="monitor3" /&gt;&lt;label for="monitor3"&gt;21" LCD Flat Screen ($350.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;/p&gt;
                      &lt;/td&gt;
  
                      &lt;td&gt;&lt;img name="monitorpic" src="monitor250.jpg" width="125" height="125" id="monitorpicture"&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;h4&gt;Computer Printer:&lt;/h4&gt;
                          &lt;p&gt;
                          &lt;input type="radio" name="printer" value="100.00" onChange="javascript:prices['printer'] = this.value; updateTotal();" onClick="changeBackground3(this.value);" id="printer1" /&gt;&lt;label for="printer1"&gt;Inkjet Printer ($100.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;input type="radio" name="printer" value="250.00" onChange="javascript:prices['printer'] = this.value; updateTotal();" onClick="changeBackground3(this.value);" id="printer2" /&gt;&lt;label for="printer2"&gt;Laser Printer ($250.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;input type="radio" name="printer" value="350.00" onChange="javascript:prices['printer'] = this.value; updateTotal();" onClick="changeBackground3(this.value);" id="printer3" /&gt;&lt;label for="printer3"&gt;Color Laser Printer ($350.00)&lt;/label&gt;&lt;/br&gt;
                          &lt;/p&gt;
                      &lt;/td&gt;
  
                      &lt;td&gt;&lt;img name="printpic" src="printer100.jpg" width="125" height="125" id="printerpicture"/&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/form&gt;
              &lt;/table&gt;            
  
          &lt;/td&gt;
          &lt;td&gt;
  
  
              &lt;table padding="10px"&gt;
                  &lt;tr&gt;
                  &lt;form name="CustomerForm"&gt;
                      &lt;td&gt;Total System Price:&lt;/td&gt;
                      &lt;td&gt;$&lt;input type="text" name="total" readonly value="0.00" size="10" id="total"&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;Full Name:&lt;/td&gt;
                      &lt;td&gt;&lt;input type="text" name="customer" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;Street Address:&lt;/td&gt;
                      &lt;td&gt;&lt;input type="text" name="address" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;City:&lt;/td&gt; &lt;br&gt;
                      &lt;td&gt;&lt;input type="text" name="city" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;State:&lt;/td&gt;
                      &lt;td&gt;
                          &lt;select name="state"/&gt;
                              &lt;option value="PA"&gt;PA&lt;/option&gt;
                              &lt;option value="NY"&gt;NY&lt;/option&gt;
                              &lt;option value="NJ"&gt;NJ&lt;/option&gt;
                              &lt;option value="DE"&gt;DE&lt;/option&gt;
                              &lt;option value="FL"&gt;FL&lt;/option&gt;
                              &lt;option value="ME"&gt;ME&lt;/option&gt;
                              &lt;option value="CA"&gt;CA&lt;/option&gt;
                         &lt;/select&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;Zip:&lt;/td&gt;
                      &lt;td&gt;&lt;input type="text" name="zip" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;Phone Number:&lt;/td&gt;
                      &lt;td&gt;&lt;input type="text" name="phone" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;Email Address:&lt;/td&gt;
                      &lt;td&gt;&lt;input type="text" name="email"&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;/form&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td&gt;&lt;input type="button" value="Submit Order" onClick="doSubmit()" /&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;input type="button" value="Clear Form" onClick="doClear()" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
  
  
  
          &lt;/td&gt;       
      &lt;/tr&gt;   
  &lt;/table&gt;
  </code></pre>
  
  <p> </p>