Sorry use this:
Form_OnSubmit = False
Exit Function
Just remember if you give the form a name then substitute it in JavaScript
-----Original Message-----
From: Michael Gagnon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 24, 2000 2:21 PM
To: CF-Talk
Subject: Re: Problem with email form validation
I'm sorry, but it still submits the form.
It must be because of the scripts created by ColdFusion.
----- Original Message -----
From: "Christopher Olive, CIO" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 24, 2000 12:02 PM
Subject: RE: Problem with email form validation
> you need to add a "return false;" in there. like this
>
> function CheckEmail() {
> if(!ValidEmail(document.EmailForm.Email)) {
> alert("<cfoutput>#data.a73#</cfoutput>");
> return false;
> }
> return true;
> }
>
> otherwise, the script will always return true, and always think the email
is
> correct.
>
> chris olive, cio
> cresco technologies
> [EMAIL PROTECTED]
> http://www.crescotech.com
>
>
>
> -----Original Message-----
> From: Michael Gagnon [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 24, 2000 10:51 AM
> To: CF-Talk
> Subject: Problem with email form validation
>
>
> 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]
>
> --------------------------------------------------------------------------
----------------------
> 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]
----------------------------------------------------------------------------
--------------------
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]
------------------------------------------------------------------------------------------------
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]