title: jQuery : simulating a click on a <input type="file" /> doesn't work in Firefox?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/210643/in-javascript-can-i-make-a-click-event-fire-programmatically-for-a-file-input">In JavaScript can I make a &ldquo;click&rdquo; event fire programmatically for a file input element?</a>  </p>
  </blockquote>
  
  
  
  <p>I've got a web page that looks like this</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;File Upload Click Test&lt;/title&gt;
          &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div onclick="$('input[type=file]').click()" &gt;CLICK SIMULATOR&lt;/div&gt;
          &lt;input type="file"&gt;&lt;/input&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My goal is to have the <em>div</em> raise a click event on the <em>file input</em>, and this seems to work exactly as I'd expect in IE and Chrome, but doesn't work in Firefox (no file browser is opened when you click on the <em>div</em>).</p>
  
  <p>Is there a way to get this working in FF?</p>