hi
i have a group of check boxes on a form for the user to select their residential status.
they have six choices and if they choose homeowner (the value of this field is o) they have to enter the value of property and amount of mortgage.
heres my code
if (theForm.m_res_status.value == “O”)
then
if ((theForm.m_value_of_prop.value ==””) ||
(theForm.m_amount_of_mortgage.value ==””))
{
alert(“Please enter the value of your property and the amount of mortgage”)
theForm.m_value_of_prop.focus()
return false;
}
i have also tryed
if (theForm.m_res_status(0).checked == true)
then
if ((theForm.m_value_of_prop.value ==””) ||
(theForm.m_amount_of_mortgage.value ==””))
{
alert(“Please enter the value of your property and the amount of mortgage”)
theForm.m_value_of_prop.focus()
return false;
}
but both of them make the value of property and amount of mortgage mandatory even if an option other than homeowner is selected ?
thanks for any help
cheers ThisAndThat