1

I wish to change some old classic ASP code. Referring to this article HTML Input="file" Accept Attribute File Type (CSV) it says in order to make a csv file as a filter in the browse for file dialog I have to add the attribute accept=".csv". I tested it at W3schools (namely: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_file) and it worked and so I naturally copied the code to my asp code however it does not work, i.e. the csv filter does not appear however in w3schools site it is the default filter. Any ideas what would could be causing this behaviour?

This is my code snippet:

<input type="FILE" name="DATAFILE" accept=".csv" size="42">

which is position inside many layers of table elements, I doubt that has any bearing however I just trying to paint a picture so I can find a solution.

Community
  • 1
  • 1
Glen
  • 526
  • 1
  • 7
  • 22
  • what do you mean it does not let you? does it throw any errors in console log ? – Josh Stevens Mar 30 '16 at 00:46
  • I am just a novice with this stuff I do not know how to view the console log. No errors as I can see on the page the browse dialog opens just has the standard filters of All Files, Pictures and HTML files, no CSV – Glen Mar 30 '16 at 00:49
  • develop tools > console .. can you post a example or a web page we can see it so i can see whats wrong with it? – Josh Stevens Mar 30 '16 at 00:50
  • ?? Develop tools where is this? I am using I.E. 10 and no I cannot give you the URL as it is a INTRANET site – Glen Mar 30 '16 at 00:54
  • I have added a clause. It works in Chrome not in I.E. but it does work in I.E. via w3schools so am I missing some mimetype or something else – Glen Mar 30 '16 at 01:04
  • Perhaps it is just the compatibility mode – Glen Mar 30 '16 at 01:30

1 Answers1

0

I added compatibility mode clause in the header and seems to be working:

...
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  ...
</head>
...
Glen
  • 526
  • 1
  • 7
  • 22