File open dialog box

i am using this html:file property

<html:file property="relationshipLimitsFile" size="25" accept="text/*" disabled="true" />

when i click on the browse button i see the Open File Dialog
and files of type shows "Allfiles " i want to change this to *.csv or *.txt
is this possible and if so how
LVL 1
radhika1306Asked:
Who is Participating?
 
thirdCommented:
try,

accept="text/csv"

or

accept="text/plain"
0
 
atul_parmarCommented:
Although it is specified in the HTML 4.01 specification but it is not supported by IE. However, Netscape 4 has little selectability (you can select it to be HTML) but can't change it to *.CSV or *.TXT

But if your intentioin is to prevent the user from selecting any otherfile (other than *.CSV or *.TXT) then better you write a javascript what checks the extention and doesn't accept it if it is not *.CSV or *.TXT

Regards,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.