Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Validate input type file Reply To: Validate input type file

#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 == ""){

}