I'm wondering why this example works this in Chrome 10, but doesn't work in Fx 3.6? IFAIK, exactly input type="file" click doesn't work there...

Could anyone explain, why?

share|improve this question
OK, I found that it's available from developer.mozilla.org/en/Using_files_from_web_applications Fx 4, but why? Is there any special technologies?? – Alex Ivasyuv Mar 13 '11 at 9:00
1  
They simply added the ability to "auto click" input of type file only in version 4, everything else in that example is available in version 3.6 already. Why? Guess that's a question to the developers, doubt you'll find them here. :) – Shadow Wizard Mar 13 '11 at 9:26

1 Answer

Hey Alex Ivasyuv,

Read your problem and took a look at the page you have pointed.

You have directed click event of the button to the click event of right? As I think that's not quite possible everywhere. The file input type handles the popups and uploads itself..

And seems you cannot trigger the popup file upload window of just by calling click() event. At least it's not possible in the browsers like Firefox, opera, chrome etc. But it's possible in IE right? (IE always behave strangely anyway..!)

I found some articles that may help to figure this out. check them. You'll solve the problem...!

01. In JavaScript can I make a "click" event fire programmatically for a file input element?

02. open file dialog box in javascript

Regards, ADynaMic

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.