Home › Forums › JavaScript › Validate input type file › Reply To: Validate input type file
August 12, 2013 at 1:54 pm
#146565
g3logic
Participant
The syntax is wrong in your JS. You are setting a value to document.getElementById(“zip_file_import”).value, instead of comparing its value as intended.
Use double equal sign and you should be good to go:
if(document.getElementById("zip_file_import").value == ""){
}