How would I write the correct solution script as seen in this post: IE input file atribute is undefined without using jQuery?
1 Answer
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];
1 Comment
jayfield1979
Thank you very much! It was the getElementsByTagName that threw me!