File Chooser...

G

Guest

Hello !

I want to do a button on a page that propose to choose a file (on the client
side) and get the path of the file.
I know that there are the HTMLInputFile and the FileUpload control, but I
don't want that the user can see the location of the file in a textbox.
A solution ?
Thanks.
 
G

Guest

Security in IE prevents you from doing almost anything to a "file" type input
control. The best I could come up with was putting this style on it:

style="width:1; BORDER-RIGHT: white thin solid; BORDER-TOP: white thin
solid; BORDER-LEFT: white thin solid; COLOR: white; BORDER-BOTTOM: white thin
solid; BACKGROUND-COLOR: white"

This does what you say, and the user can't see the text or the textbox. It
makes the button look a little weird though. And no, you can't hide the file
control and use another button to "script click" it. I tried. =) IE security
prevents it.
 
G

Guest

You can hide the html input file in IE. All you need to do is put it inside
a DIV tag. I saw this example somewhere else on these newsgroups.

Eg.
<div style="VISIBILITY: hidden; WIDTH: 0px; HEIGHT: 0px"><INPUT
id="fileBrowse" type="file"></div>
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top