Using .trigger to open a file browser

Using .trigger to open a file browser

Hello there, I'm trying to use .trigger on an anchor tag that basically shows an <input type=file> tag that opens the file browser. I would like to skip the step of clicking on the browse button to open the file browser and instead just open the file browser directly with the anchor tag "Choose File...". I'm using .trigger('focus') to do this. It does focus, but it doesn't click. .trigger('click') doesn't work either, and .triggerHandler doesn't do what I need it to do (I want the default action for the file browser to work). Any help would be appreciated.

Thanks,

Eggers

  1.                         <a href="#" class="file" onclick="$(this).parent().parent().find('input').show(); $(this).parent().parent().find('input').trigger('focus'); return false;">Choose file</a>