D
DoomedLung
Hey,
I'm in the process of writing a function to check each element of a
form isn't empty. I've come to a dead end..
Here is my function:
function validateData(){
var i;
var form = document.forms[0];
var formElem = form.elements;
for(i = 0; i < formElem.length; i++){
if(formElem.value == ""){
alert('you have not fill out the form');
break;
}else if(formElem.value != ""){
continue;
}
formElem.focus();
}
}
Any help would be much appreciated
I'm in the process of writing a function to check each element of a
form isn't empty. I've come to a dead end..
Here is my function:
function validateData(){
var i;
var form = document.forms[0];
var formElem = form.elements;
for(i = 0; i < formElem.length; i++){
if(formElem.value == ""){
alert('you have not fill out the form');
break;
}else if(formElem.value != ""){
continue;
}
formElem.focus();
}
}
Any help would be much appreciated