Sorry, couldn't really understand that..
i am posting this, to make it more clear hopefully,
this is the validation code i am using :
if (form.ATTACH_APPROVAL_FROM_CUSTOMER_PATH.value == "")
{
alert("PleaseAttatch Approval From Customer");
form.ATTACH_APPROVAL_FROM_CUSTOMER_PATH.focus();
return false;
}
This is the field on who's value the next field depends :
<!-- Customer Sign Off -->
<tr>
<td height="25" bgColor=#eeeeee class='cellDesc' width="35%"> Customer Sign Off <font color='#ff0000'>*</font> </td>
<td height="25" bgColor=#eeeeee>
<input type="radio" name="CUSTOMER_SIGN_OFF" value="Y" size=2 checked tabIndex="7">Yes  
<input type="radio" name="CUSTOMER_SIGN_OFF" value="N" size=2 tabIndex="7">No
</td>
</tr>
now depending on the answer to above, this following field should be optional or mandatory
if its optional i do not need to call the validation function and also remove the star (*) from the field name, otherwise
i call the validation function and keep the (*) as well..
<!-- attatch approval customer -->
<tr>
<td height="25" bgColor=#eeeeee class='cellDesc' width="35%"> Attach Approval From Customer <font color='#ff0000'>*</font></td>
<td bgColor=#eeeeee>
<input type=file name="ATTACH_APPROVAL_FROM_CUSTOMER_PATH" class='cellData' maxlength="30" style="WIDTH: 302px; HEIGHT: 17px" size=45 title="Upload Customer Approval" tabIndex=13><font size="2"> </font>
</td>
</tr>