I have a customvalidator control checking an email text control (input). It is set to run the function below, but marks the page as invalid, even though I have satisfied the criteria.
The HTML source is :
Thanks
The risk with keeping an open mind is having your brains fall out.
Shaunk
Code:
<script language="javascript" type="text/javascript" >
Function CheckEmail(source,arguments)
{
If (arguments.value.indexof("S") == -1)
{
arguments.isvalid = false
}
else
{
arguments.isvalid = true
}
}
</script>
The HTML source is :
Code:
<asp:CustomValidator ID="CustValEmail" runat="server" ErrorMessage="Email Must contain an 'S'" ClientValidationFunction="CheckEmail" ControlToValidate="txtEmail" Display="Dynamic"></asp:CustomValidator>
Thanks
The risk with keeping an open mind is having your brains fall out.
Shaunk