Menu
Hi,
im using this script for validating a mail form and make sure no field is left blank. It works fine with text inputs and textareas but not with radio buttons or dropdowns. This is the code
[CODE]<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(email,”Email must be filled out!”)==false)
{email.focus();return false;}
}
}
</script>
Could somebody please help me with this?
thank you.