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

HTML Input=file - specify file type.

P: n/a
UJ
Is there any way on an input="file" to specify what the default accepted
types are? I don't want to have the user even be able to see the wrong type.

TIA - Jeff.
Apr 25 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jeff
Then try validating the input.
I mean the file extensions.
Patrick

"UJ" <fr**@nowhere.com> wrote in message
news:uE**************@TK2MSFTNGP03.phx.gbl...
Is there any way on an input="file" to specify what the default accepted
types are? I don't want to have the user even be able to see the wrong
type.

TIA - Jeff.

Apr 25 '06 #2

P: n/a
UJ
I'm already doing that in code. I'd like to have it so that when the dialog
box comes up, if I want them to select a *.txt file, it only shows the .txt
files.

"Patrick.O.Ige" <na********@hotmail.com> wrote in message
news:O0**************@TK2MSFTNGP05.phx.gbl...
Jeff
Then try validating the input.
I mean the file extensions.
Patrick

"UJ" <fr**@nowhere.com> wrote in message
news:uE**************@TK2MSFTNGP03.phx.gbl...
Is there any way on an input="file" to specify what the default accepted
types are? I don't want to have the user even be able to see the wrong
type.

TIA - Jeff.


Apr 25 '06 #3

P: n/a
> Is there any way on an input="file" to specify what the default accepted
types are? I don't want to have the user even be able to see the wrong type.

TIA - Jeff.


According to the standards-definition, there is an "accept" attribute.
http://www.w3.org/TR/html401/interac...tml#edef-INPUT
BUT: no browser supports it (as far as I know)

Hans Kesting
Apr 25 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.