<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/