0

I want get file from input file and send file to server but I can not do in ie 7,8,9 how I can get file from input tag in ie 7,8,9

html

<input name="file" id="file" type="file" />

script

var control = document.getElementById('file');
    var file = control.files[0];
    var name = file.name;
    var size = file.size;
3
  • I don't think you can get the file contents... Commented Sep 14, 2013 at 8:52
  • You can't in IE 7,8,9 as noted elsewhere, what are you trying to do? Just upload the file asynchronously, or are you wanting to do more? Commented Sep 14, 2013 at 10:14
  • Well I wouldn’t say it’s impossible in general – but instead of JavaScript one might have to use techniques like Active-X, VBScript or other atrocities … so most likely not worth the hassle. Commented Sep 14, 2013 at 11:13

2 Answers 2

1

This is not possible in ie 7,8,9 so you need a button to submit the form normally.

Sign up to request clarification or add additional context in comments.

Comments

0

IE does not support the File API before version 10.

If you want to support those browsers, you'll need to take a different approach, such as using Flash.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.