Trigger Show file upload dialog event

I want to show the file upload dialog on button click and not the [type = "file"] input part, how can I do that?

Basically I want to style the html file upload control.

+2


a source to share


4 answers


Alternative way to inject style files using JavaScript but not Flash:



http://www.shauninman.com/archive/2007/09/10/styling_file_inputs_with_css_and_the_dom

+3


a source


I'm pretty sure there is no way to do this for security reasons.



You might be able to do this using a Flash based uploader like SWFUpload . Obviously, Flash is installed and works a little differently than regular file downloads.

+1


a source


Two days ago I was dealing with the same thing. I noticed uploadify

it allows you to create a custom download button and style your progress bar. it makes an ajax call to php script. it also has many options from file type / size limits etc.

rather glad I found it. like pekka said it also uses a flash gateway to do this.

0


a source


document.formname.file.click()

works, but not in Opera. I am still searching the net to decide.

0


a source







All Articles