0

How would I write the correct solution script as seen in this post: IE input file atribute is undefined without using jQuery?

Community
  • 1
  • 1
jayfield1979
  • 355
  • 1
  • 5
  • 16

1 Answers1

1

Just translated to JavaScript!

var input = document.getElementById("handlerxhr1")         
document.getElementById('upload').attachEvent('onclick', function() {             
    alert(input);          
}); 

translation of this: var x = $('input[type=file]:eq(0)'); is:

var x = document.getElementsByTagName('input')[0];