how to combine drop down list and text field validation
What I'm trying to accomplish here is when: Office Departure/Return is selected then the 2 fields
<td width="10" align="right"><input CLASS="valueEditable"type="text" name="_1_1_40_1" ID="_1_1_40_1" value="[LL_FormTag_1_1_40_1 /]"></td>
and <td width="10" align="right"><input CLASS="valueEditable"type="text" name="_1_1_40_1" ID="_1_1_40_1" value="[LL_FormTag_1_1_41_1 /]"></td>
will become required field.
Any help will be apprieciated
function fieldValidation()
{
if($("#_1_1_45_1").val()=='_1_1_2' &&($("#_1_1_40_1").val()==''&&$("#_1_1_41_1").val()==''))
{
alert('OFFICE DEPARTURE TIME and TIME RETURNED TO OFFICE are required!');
return false;
}
else
{
return true;
}
}
function Meansofpayment(_1_1_45_1)
{
if (_1_1_45_1!="") {
obj=document.getElementById(_1_1_45_1);
obj.style.display=( (obj.style.display=='none') ? '' : 'Please select');
}
Bookmarks