This function is working only if the first field beong check is left empty 'add.b_name', the others are being ingonored. Any idea why? I am not sure about the four } I have placed at the end, one for every if statement.
Thanks
function formCheck() {
var not_blank = true;
if (document.add.b_name.value.length < 3){
if (document.add.b_surname.value.length < 3){
if (document.add.g_name.value.length < 3){
if (document.add.g_surname.value.length < 3){
alert("Any of the required fields left blank or invalid");
not_blank = false;
}
return not_blank;
}}}}
Getting married in Malta?
Visit
Thanks
function formCheck() {
var not_blank = true;
if (document.add.b_name.value.length < 3){
if (document.add.b_surname.value.length < 3){
if (document.add.g_name.value.length < 3){
if (document.add.g_surname.value.length < 3){
alert("Any of the required fields left blank or invalid");
not_blank = false;
}
return not_blank;
}}}}
Getting married in Malta?
Visit