disabling the file type input box

C

chintanpsanghvi

hi,

can anyone tell me how do i disable the file type dialog box .

I want the user select the file through browse buttton,but i do not
want him to edit the file name he has select in the text box where it
gets dispalyed.

Thanks
-Chints
 
I

Ivo

can anyone tell me how do i disable the file type dialog box .

I want the user select the file through browse buttton,but i do not
want him to edit the file name he has select in the text box where it
gets dispalyed.

I suppose the browser makers thought the only really important thing is what
the user wants. At least, what you want is not possible in all browsers
(iirc there are some that prohibit manual editing of the file name as you
want automatically). The "textfield" and button of a <input type="file">
element are one and the same thing, you can't disable one and leave the
other. Many people have tried mimicking the functionality with a ton of
script, overlaying the "textfield" part with a real <input type="text">,
clipping the file box, etc. techniques which are bound to fail in one or
more situations.
The best tip is probably: leave it, let the user mess up if he wants, and
deal with it on the server. If your visitors are true idiots, perhaps put up
a warning message in plain text next to the box, but chose your words
carefully, as any sane user will surely feel insulted by such condescension.
hth
ivo
http://4umi.com/web/javascript/
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top