0

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

1
  • 1
    Have you tried anything? Commented Mar 5, 2012 at 22:55

1 Answer 1

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];
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much! It was the getElementsByTagName that threw me!

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.