I have a form that is validating textboxs that are empty.
textbox name
emplid
firstname
lastname
Can someone help with a problem I have
If I have a value in emplid then I don't want to validate firstname lastname. if I have a value in firstname and lastname Then I don't want to validate emplid
Can someone help me with this?
thanks in advance
I have the sample code I working with here
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{
alert(alerttxt);return false;
}
else
{
return true;
}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_required(EMID,"Input EMPLID!")==false)
{EMID.focus();return false;}
if (validate_required(firstname,"Input first name!")==false)
{firstname.focus();return false;}
if (validate_required(lastname,"Input last name!")==false)
{lastname.focus();return false;}
}
}
textbox name
emplid
firstname
lastname
Can someone help with a problem I have
If I have a value in emplid then I don't want to validate firstname lastname. if I have a value in firstname and lastname Then I don't want to validate emplid
Can someone help me with this?
thanks in advance
I have the sample code I working with here
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{
alert(alerttxt);return false;
}
else
{
return true;
}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_required(EMID,"Input EMPLID!")==false)
{EMID.focus();return false;}
if (validate_required(firstname,"Input first name!")==false)
{firstname.focus();return false;}
if (validate_required(lastname,"Input last name!")==false)
{lastname.focus();return false;}
}
}