File Upload Issue - INPUT type="file" and Use of .click()

H

HVG

Hi, does anyone know why using ".click()" on a <INPUT type="file"> control
should be a problem?

- the html file selction control is on a very plain webform page with just
the <input type="file"> control and a submit button.
- the ".click()" method is simply used to automatically open the file
selction dialog box so the user doesn't have to click "Browse". (likewise
the form is automatically submitted when the user selects a file).
The wierd effect is:
- When the user first clicks the submit button (after selecting a file),
the form does not submit, and the file selction input control clears
- If the user now selects a file again by clicking the "Browse" button
manually, the process works just fine.

So I guess the file selction control is not executing something internally
when we simulate a "Browse" button click by envoking the "click()" method.
Any ideas much appreciated.

Regards
Hugo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top