How to determine if user selected a file for file upload?

This works in IE (and FF, I believe):

if(document.getElementById("uploadBox").value != "") {
   // you have a file
}

Leave a Comment