title: Detecting form change get id
body: <p>I am trying to get the form id when an option in a drop down is selected:</p>
  
  <p>HTML  </p>
  
  <pre><code>&lt;form id="test"&gt;
       &lt;select id="option1"&gt;
        &lt;option id="opt1"&gt;Hello&lt;/option&gt;
       &lt;/select&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$("#test").change(function(){
  
       var formid=$("test").parent("form");
       alert(formid);
  
  });
  </code></pre>
  
  <p>The output in the alert is "object object". I have also tried closest which gives the same output.</p>