title: Reset 2 different forms
body: <p>I am trying to reset the 2 functions from 1 button with a function called resetFunctions() but nothing happens. The 2 other resets are working because I need them to reset only on function. I have always seen reset for each function so I am not sure if this can happens.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;head&gt;
      &lt;script type="text/javascript"&gt;
      function result() {
     document.getElementById('ansCAL').value = calculate() + calculate1();
  }
  function populate(select1, select2)
  {
      var Brand1 = document.getElementById(select1);
      var Brand2 = document.getElementById(select2);
      Brand2.innerHTML = "";
      if(Brand1.value == "Chevy")
      {
          var optionArray = ["|","1000|Camaro","2000|Corvette","3000|Impala"];//The | means a blank space, camaro is the label, Camaro is the value, ex. value 1000 and corvette is the label
      }
      else if(Brand1.value == "Dodge")
      {
          var optionArray = ["|","4000|Avanger","5000|Challengere","6000|Charger"];
      }
      else if(Brand1.value == "Ford")
      {
          var optionArray = ["|","7000|Mustang","8000|Shelby","focus|Focus"];
      }
      for(var option in optionArray)//the options within the optionArray
      {
          var pair = optionArray[option].split("|");//in tha variable pair is stored both value and label
          var newOption = document.createElement("option");// option in the bracket is used to create new options or you can insert divs paragraph etc
          newOption.value = pair[0];//pair 0 gives the value
          newOption.innerHTML = pair[1];//pair 1 gives the label
          Brand2.options.add(newOption);
      }
  }
  //second function
  function calculate() {
      var Brand1 = 0;
      var Brand2 = 0;
      Brand1 = document.getElementById('slct1').value;
      Brand2 = document.getElementById('slct2').value;
      multi=document.getElementById('amount').value;
      total=parseInt((Brand2)*multi/100);
      document.getElementById('answer').value=total;
      /*document.getElementById("ansCAL").innerHTML = "&lt;br&gt;Total amount " + (total + total1);*/
  }
  //second Main function
  function populate1(Select1a, Select2a)
      {
          var Brand1a = document.getElementById(Select1a);
          var Brand2a = document.getElementById(Select2a);
          Brand2a.innerHTML = "";
          if(Brand1a.value == "Chevy")
      {
          var optionArray = ["|","1000|Camaro","2000|Corvette","3000|Impala"];//The | means a blank space, camaro is the label, Camaro is the value, ex. value 1000 and corvette is the label
      }
      else if(Brand1a.value == "Dodge")
      {
          var optionArray = ["|","4000|Avanger","5000|Challengere","6000|Charger"];
      }
      else if(Brand1a.value == "Ford")
      {
          var optionArray = ["|","7000|Mustang","8000|Shelby","focus|Focus"];
      }
          for(var option in optionArray)//the options within the optionArray
          {
              var pair = optionArray[option].split("|");//in tha variable pair is stored both value and label
              var newOption = document.createElement("option");// option in the bracket is used to create new options or you can insert divs paragraph etc
              newOption.value = pair[0];//pair 0 gives the value
              newOption.innerHTML = pair[1];//pair 1 gives the label
              Brand2a.options.add(newOption);
          }
      }
  //second function
  function calculate1() {
      var Brand1a = 0;
      var Brand2a = 0;
      Brand1a = document.getElementById('slct1a').value;
      Brand2a = document.getElementById('slct2a').value;
      multi=document.getElementById('amount1').value;/*to change accordingly amount1*/
      total1=parseInt(((Brand2a)*multi)/100);
      document.getElementById('answer1').value=total1;/*to change accordingly amount1*/
      document.getElementById("ansCAL").innerHTML = "&lt;br&gt;Total amount " + (total + total1);
  }
  function resetFunctions() {
      document.getElementById("slct2a").reset();
      document.getElementById("slct2a").reset();
  }
      &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;form&gt;
      Choose Your Car:
      &lt;select id="slct1" name="slct1" onchange="populate('slct1','slct2')"&gt;
          &lt;option value=""&gt;&lt;/option&gt;
          &lt;option value="Chevy"&gt;Chevy&lt;/option&gt;
          &lt;option value="Dodge"&gt;Dodge&lt;/option&gt;
          &lt;option value="Ford"&gt;Ford&lt;/option&gt;
      &lt;/select&gt;
  
      Choose Type of Car:
      &lt;select id="slct2" name="slct2"&gt;
  
      &lt;/select&gt;
      &lt;label&gt;&amp;nbsp;Amount&amp;nbsp;&lt;input type="number" name="amount" id="amount" size="1" onkeyup="result()"/&gt;   (g)&amp;nbsp;&lt;/label&gt;
      &lt;label&gt;&amp;nbsp;Total&amp;nbsp;&lt;input type="number" name="answer" id="answer" size="1"/&gt;&lt;/label&gt;   
      &lt;input type="reset" name="Reset" value="Reset"/&gt;
      &lt;br&gt;&lt;br&gt;&lt;br&gt;
      &lt;hr&gt;
      &lt;br&gt;
      &lt;/form&gt;
      &lt;!--Starts 2 selection--&gt;
      &lt;form&gt;
          Choose Your Car:
      &lt;select id="slct1a" name="slct1a" onchange="populate1('slct1a','slct2a')"&gt;&lt;!--changed accordingly increased a after slct1a--&gt;
          &lt;option value=""&gt;&lt;/option&gt;
          &lt;option value="Chevy"&gt;Chevy&lt;/option&gt;
          &lt;option value="Dodge"&gt;Dodge&lt;/option&gt;
          &lt;option value="Ford"&gt;Ford&lt;/option&gt;
      &lt;/select&gt;
  
      Choose Type of Car:
      &lt;select id="slct2a" name="slct2a"&gt;
  
      &lt;/select&gt;
      &lt;label&gt;&amp;nbsp;Amount&amp;nbsp;&lt;input type="number" name="amount1" id="amount1" size="1" onkeyup="result()"/&gt;     (g)&amp;nbsp;&lt;/label&gt;       &lt;!--changed accordingly increased 1 after calculate--&gt;
      &lt;label&gt;&amp;nbsp;Total&amp;nbsp;&lt;input type="number" name="answer1" id="answer1" size="1"/&gt;&lt;/label&gt;   
      &lt;input type="reset" name="Reset" value="Reset"/&gt;
      &lt;br&gt;&lt;br&gt;&lt;br&gt;
      &lt;p id="ansCAL"&gt;&lt;/p&gt;
      &lt;/form&gt;
      &lt;input type="button" onclick="resetFunctions()" value="Reset"&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>