Hi All I need to make a java script function in which i need to check if warehouse is selected the continue
else alert mesage should display.
I have written a java script code which i have called on submit event.
my code is running if i comment my if condition.
i m getting all the value which is required.
the problem i m getting from if to else condition.I m not getting even java script error but not getting the alert
and even not able to continue.
please help to solve my problem
below is my java script code
////
function chkWarehouse()
{
for (k=1;k<=document.form1.cnt.value;k++)
{
ware_id=”warehouse_id_”+k;
//alert (ware_id);
//alert(document.form1[ware_id].value==0);
if ((document.form1[ware_id].value==0) && (document.form1[ware_id].value==”Accepted”))
{
alert(“Please enter warehouse for the purchase order !”);
document.form1[ware_id].focus();
return false;
}
else
{
return true;
}
}
}
////