coure2011
coure2011

Reputation: 42474

Trigger Show event of file upload dialog

i want to show file upload dialog on click of a button thats not the part of input[type="file"] how can i do this?

Basically i want to stylize the file upload control of html.

Upvotes: 2

Views: 1488

Answers (4)

mete
mete

Reputation: 1

document.formname.file.click() works but not in Opera i am still searching the net to solve.

Upvotes: 0

Paul Groves
Paul Groves

Reputation: 4051

Alternate way to style file inputs using JavaScript but no Flash:

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

Upvotes: 3

Ali Habibzadeh
Ali Habibzadeh

Reputation: 11568

two days ago i was dealing with the same thing. I spotted uploadify

it allows you to have custom button for upload and ability to style your progress bar. it makes an ajax call to a php script. it also has loads of options from restricting file types/sizes/etc.

pretty happy i found it. same as pekka said this one also uses a flash gateway to do this.

Upvotes: 0

Pekka
Pekka

Reputation: 449753

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

You may be able to do it using a Flash-based uploader like SWFUpload. It obviously needs Flash installed and functions in a slightly different way than normal file uploads.

Upvotes: 1

Related Questions