title: IE9 file input triggering using Javascript
body: <p>I had a post here:</p>
  
  <p><a href="https://stackoverflow.com/questions/8827137/change-acting-weird-in-ie9">.change acting weird in IE9</a></p>
  
  <p>However, I have run into a new incident regarding the form handling of file upload and was curious if anyone has run into this issue.</p>
  
  <p>My original problem was that I could not get an onchange event to work and I thought perhaps it was an issue with my javascript, but I found that it has to do with the way that the form is being activated.</p>
  
  <p>I have a file input</p>
  
  <pre><code>&lt;input type="file" name="abc"/&gt;
  </code></pre>
  
  <p>now I've done 2 things. </p>
  
  <p>I've hidden the input and created a button (for better styling control) that activates the input.</p>
  
  <pre><code>&lt;button id="mybutton"&gt;click to upload a pic&lt;/button&gt;
  &lt;input type="file" name="abc"/&gt;
  </code></pre>
  
  <p>and then the JS for the interaction between the two:</p>
  
  <pre><code>$("#mybutton").click(function() {
      $("Input[type=file]").click()
  };
  </code></pre>
  
  <p>and of course a submit for the form (i use parent in this example, but you in my actual code I use the form id).</p>
  
  <pre><code>$("input[type=file]").change(function() {
    $(this).parent().submit();
  });
  </code></pre>
  
  <p>When I click "mybutton" the expected result does occur my browse window opens and lets me choose a file from my computer. Also when I change the file in all browsers other than IE the onchange event is fired. Now if I unhide the form and manually click the "browse" button and choose a file the onchange event is fired.  So basically the browser treats clicking the actual file button differently than doing a $("input[type=file]").click()</p>
  
  <p>anyone know how to fix this?</p>