Dear all,I have this JS validations on a button. All i want to do is check a combo field and call other functions in JS header according to that. After validating all i’m calling a button click event…I couldn’t make this run at all…Pls help me…
Thanks in advance
Shana
if (document.forms[0].Fld_Catg.selectedIndex == 0) then
{
a=isEmptymessage(document.forms[0].St_Date.value,“Start Date”)
if (a ==true) {
a=isValidDate(document.forms[0].St_Date.value)
if (a ==true) {
a=isEmptymessage(document.forms[0].End_Date.value,“End Date”)
if (a ==true) {
a=isValidDate(document.forms[0].End_Date.value)
if (a ==true) {
a=dateOrder(document.forms[0].St_Date.value,document.forms[0].End_Date.value)
}}}}
else if (document.forms[0].Fld_Catg.selectedIndex == 1) then
{
a= isEmptyCombo(document.forms[0].Fld_ResPers.value,“Responsible Person”)
}
else if (document.forms[0].Fld_Catg.selectedIndex == 2) then
{
a= isEmptyCombo(document.forms[0].Fld_Division.value,“Responsible Person”)
}
if (a ==true) {
document.forms[0].SearchDB2.click();
}}