Hi WartookMan,
I am know pulling my hair out.
I have edited the code you supplied so that it lists only the fields that are blank. That works great.
I have been trying to get it to check if a value in a field is less than 3 and if one of 3 phone number fields is entered.
It seems to skip the 2 parts I have entered and just produce the list of empty fields.
I am obviously missing something. I have searched the internet for the syntax of loops and if statements in Javascript and I thought that I had done it correctly.
Here is the code.
<!--
//function formValidateEmail(email) {
// var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
//return regex.test(email);
//}
function VerifyData() {
var msg1="The following fields must be completed:";
var blank = false;
var msg2="At least one of the following must be completed:\n* Email\n* Phone";
var invalidPhone=false;
for(var x=0;x<document.forms[0].length;x++) {
theObj=document.forms[0].elements[x];
theType=theObj.type;
theName=theObj.name;
theValue=theObj.value;
if((theType!="SUBMIT"

&&(theType!="RESET"

) {
// check if the field is the Email address and validate
if( ((theName=="Title"

&&(theObj.selectedIndex==0)) ||
((theName=="Forename"

&&(theValue==""

) ||
((theName=="Initial"

&&(theValue==""

) ||
((theName=="Surname"

&&(theValue==""

) ||
((theName=="Loan_Amount"

&&(theObj.selectedIndex==0)) ||
((theName=="Loan_Purpose"

&&(theObj.selectedIndex==0)) ||
((theName=="DOB"

&&(theValue==""

) ||
((theName=="Sex"

&&(theObj.selectedIndex==0)) ||
((theName=="Marital_Status"

&&(theObj.selectedIndex==0)) ||
((theName=="No_of_Children"

&&(theValue==""

) ||
((theName=="House_Number"

&&(theValue==""

) ||
((theName=="House_Name"

&&(theValue==""

) ||
((theName=="Flat_Number"

&&(theValue==""

) ||
((theName=="Street_Name"

&&(theValue==""

) ||
((theName=="District"

&&(theValue==""

) ||
((theName=="Town"

&&(theValue==""

) ||
((theName=="County"

&&(theValue==""

) ||
((theName=="Postcode"

&&(theValue==""

) ||
((theName=="Years_at_Address"

&&(theValue==""

) ||
((theName=="Months_at_Address"

&&(theValue==""

) ||
//((theName=="Home_Phone"

&&(theValue==""

) ||
//((theName=="Mobile_Phone"

&&(theValue==""

) ||
//((theName=="Daytime_Phone"

&&(theValue==""

) ||
((theName=="Employers_Name"

&&(theValue==""

) ||
((theName=="Employers_Address"

&&(theValue==""

) ||
((theName=="Years_with_Employer"

&&(theValue==""

) ||
((theName=="Months_with_Employer"

&&(theValue==""

) ||
((theName=="Employment_Status"

&&(theObj.selectedIndex==0)) ||
((theName=="Net_Income"

&&(theValue==""

) ||
((theName=="Are_you_Paid"

&&(theObj.selectedIndex==0)) ||
((theName=="Surname"

&&(theValue==""

) ) {
msg1+="\n* "+theName;
blank = true;
}
}
}
if ((theName=="Years_at_Address"

&&(theValue<="3"

){
alert("Please enter a previous address"

;
}
if( (theName=="Home_Phone"

&&(theValue==""

||
(theName=="Mobile_Phone"

&&(theValue==""

||
(theName=="Daytime_Phone"

&&(theValue==""

){
invalidPhone=true;
}else{
invalidPhone=false;}
if(blank) {
alert(msg1);
return false;{
}
if(!(invalidPhone)) {
return true;
}else {
alert("Please enter one of the three phone numbers required."

;
return false;
}
}
}
//-->
Please help.
Thanks
Symon.
Everything has an answer, it's just knowing the right question to ask. !!!!