it does nothing because your filepath var IS nothing.
you have 2 things wrong:
-none is not a keyword.
-you are referencing an element of your form... but not what's IN the form.
Code:
var filepath = document.getElementById("fileSelect").value;
if((filepath == "") || (isNull(filepath)) {
return false;
}
or,
Code:
var filepath = document.getElementById("fileSelect").value;
function errorpath() {
if (something) { return true; }
else { return false; }
}
if((filepath == "") || (isNull(filepath)) {
return errorpath();
}
Bookmarks