K
ken
I am trying to validate a form with the following code but the code is not
working like I wish. How can I check to see that if status=closed then a
date is entered in the cloaseddate field. Also if a date is entered in the
closeddate field then the status= closed
Thanks
Ken
<script>
if(document.Form1.Status.value=="Closed" &&
document.Form1.Closeddate.value=="") {
window.alert ("Please Enter a Closed Date!");
return false;
}
if(document.Form1.closeddate.value<>"" &&
document.Form1.Status.value<>"Closed") {
window.alert ("Please change the status to Closed!");
return false;
}
</script>
working like I wish. How can I check to see that if status=closed then a
date is entered in the cloaseddate field. Also if a date is entered in the
closeddate field then the status= closed
Thanks
Ken
<script>
if(document.Form1.Status.value=="Closed" &&
document.Form1.Closeddate.value=="") {
window.alert ("Please Enter a Closed Date!");
return false;
}
if(document.Form1.closeddate.value<>"" &&
document.Form1.Status.value<>"Closed") {
window.alert ("Please change the status to Closed!");
return false;
}
</script>