2

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.

4 Answers 4

3

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

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

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.

Comments

0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.