How would I write the correct solution script as seen in this post: IE input file atribute is undefined without using jQuery?
Asked
Active
Viewed 249 times
0
-
1Have you tried anything? – Colin Brock Mar 05 '12 at 22:55
1 Answers
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];
-
Thank you very much! It was the getElementsByTagName that threw me! – jayfield1979 Mar 06 '12 at 20:39