By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,968 Members | 1,610 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,968 IT Pros & Developers. It's quick & easy.

disabling the file type input box

P: n/a
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

Aug 25 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ivo
<ch*************@gmail.com> wrote

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/


Aug 25 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.