So I was asking a question on here, got around to implementing the solution, and it doesn't seem to work particularly well - I keep getting the error "content of elements must consiste of well-formed mark-up"
I am using the NetBeans IDE.
It seems to center around the < before len
Here's the code that brings up this error:
function formValidation() {
var ids = ["orgname", "cultpicklist", "catpicklist", "servpicklist"],
formValue = 1;
for (var i = 0, len = ids.length; i < len; i++) {
if (document.getElementById(ids[i]).value === "") {
formValue = 0;
break;
}
if (formValue == 1) {
return true;
} else if (formValue == 0) {
alert('Please fill out all required fields');
return false;
}
}