Hi!
I was wondering if there was a way arond this problem.
I am using the CFINPUT 's "Required" and "Message"
options. They work great, except that I want to
go further with the email verification.
I inserted a script to verify the format of the
email address. The problem is that if all the
fields are correct except for the email format, this scripts
correctly tells me that the email is not in a proper format,
but after I click on OK, the form is sent anyways.
Here is one of the scripts I tried:
<script language="JavaScript">
function ValidEmail(item) {
var lsAT;
var lsDOT;
lsAT = item.value.indexOf("@");
lsDOT = item.value.indexOf(".");
if (lsAT == -1 || lsDOT == -1 || item.value.indexOf(" ") != -1 || lsAT +
1 >= lsDOT ) {
return false;
}
return true;
}
function CheckEmail() {
if(!ValidEmail(document.EmailForm.Email)) {
alert("<cfoutput>#data.a73#</cfoutput>");
}
return true;
}
</script>
Any help would greatly be apreciated.
TIA!
_____________________
Michael
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]