title: Form doesn't reset with javascript
body: <p>I'm trying to reset a form, but it doesn't clear out the previous selections. So when I refresh the page and submit it remembers the old values and submits them. Even if I haven't made any selections on the form. This is the code:</p>
  
  <pre><code>&lt;script&gt;
   $(function(){ 
     $("#eventForm")[0].reset();
     });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks</p>
  
  <p>EDIT: The form</p>
  
  <pre><code>&lt;form id="eventForm"&gt;            
       &lt;select name="eventer" id="abc"&gt;
          &lt;option value="" disabled="disabled" selected="selected"&gt;Select  Event&lt;/option&gt;
          &lt;option value="USA"&gt;US&lt;/option&gt;
          &lt;option value="UK"&gt;UK/option&gt;
          &lt;option value="Fr"&gt;France&lt;/option&gt;
       &lt;/select&gt;
  
      &lt;input type="submit" id="open" onclick="heading()" value="Start" /&gt;
      &lt;input type="button" id="close" onclick="closeAnalysis()" value="Stop"/&gt;
  </code></pre>
  
  <p>I tried clearing them like this, but no success:</p>
  
  <pre><code>$(document).ready(
     function(){
     $("#close").click(
      function(){
       var values = [];
       var selected = $("select").each(
        function(){
        values.push( $(this).val());
        });
      this.form.reset();
      for (i=0;i&lt;selected.length;i++)
      $(selected[i]).val(values[i]);
    });
    }
   );
  </code></pre>