Hi,
I have a javascript code that returns an error message when a requiered field is left empty. This part works properly. Unfortunately, when one of the fields is not visible in the form, the code doesn't work anymore. I'm new with javascript. Any help will be greatly appreciated. Below is my code:
function Verify()
{
var R_Val = null;
var themessage = "Fields empty! Cannot continue";
if (Form1.CustFullnametxt.value=="") {
R_Val = 1;
}
if (Form1.InstitutioncodeSel.value=="") {
R_Val = 1; }
if (Form1.AccountOfficerSel.value=="") {
R_Val = 1; }
if (R_Val == 1) {
//Form1.submit();
return true;
}
else {
alert(themessage);
location.href=kk;
return false;
}
}
Thanks,
AB
I have a javascript code that returns an error message when a requiered field is left empty. This part works properly. Unfortunately, when one of the fields is not visible in the form, the code doesn't work anymore. I'm new with javascript. Any help will be greatly appreciated. Below is my code:
function Verify()
{
var R_Val = null;
var themessage = "Fields empty! Cannot continue";
if (Form1.CustFullnametxt.value=="") {
R_Val = 1;
}
if (Form1.InstitutioncodeSel.value=="") {
R_Val = 1; }
if (Form1.AccountOfficerSel.value=="") {
R_Val = 1; }
if (R_Val == 1) {
//Form1.submit();
return true;
}
else {
alert(themessage);
location.href=kk;
return false;
}
}
Thanks,
AB