> Sorry folks a little off topic here, but I'm not good at javascript.

> I have this email confirm code that tells me I need to enter a valid 
> email, but then still sends me to the next form which generates an 
> error because of no email address. 

> The problem seems to be in this section not stopping the submission so 
> that the user can enter a valid email

> ---------------------------
> if (goodEmail){
   
> good = true
> } else {
   
> alert('Please enter a valid e-mail address.')
   
> field.focus()
   
> field.select()
   
> good = false
      
> }
> }
> ---------------------------

> Any help appreciated.

> RO
> HWW

> The full code is below:

> var good;
> function checkEmailAddress(field) {
<snipped>

I gather that you are firing this function when the submit button on the form  
is clicked.
Assuming that to be the case, if the validation is OK, return TRUE from the 
function call, and if the validation is incorrect, then return FALSE.  This 
should stop the form from being submitted inappropriately.

But the other buy was right in regards CFForm, as that is a much simpler way of 
handling the whole thing..

HTH
Bryn
Assumng that 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332364
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to