I have some basic form validation, it works fine in all browsers apart from IE. In IE even if the value is selected I get the alert message.
Have I made a basic IE mistake?
Thanks
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(quantity,"Please enter a quantity")==false)
{quantity.focus();return false;}
if (validate_required(colour,"Please enter a colour")==false)
{colour.focus();return false;}
}
}
</script>
Have I made a basic IE mistake?
Thanks