PDA

View Full Version : Help with email validation form


infinivert
04-03-2006, 11:38 PM
I am modifying a bit of code from javascriptworld.com (http://www.javascriptworld.com/scripts/script08.10.html) for an e-mail validation form. The original code is for a form with one e-mail input field. My form has four e-mail input fields, one for the person filling out the form, and 3 for people he/she wants to send an invite to.

The original code has been implemented on my webserver here. (http://www.beltwaymedia.org/carpicker.htm)

My modified code has been implemented here. (http://www.beltwaymedia.org/beltwayevite.htm)

Here's the problem I'm running into:

If I submit each form, leaving the e-mail address field (any of the 4 e-mail fields on my form) blank or incorrect, the script catches it and alerts me. However, on my script, the form goes on and attempts to access the script assigned to the form's action attribute. In the example, the false return stops the form from actually submitting, and I can't figure out what I've done to change that.

Please help!

Thanks!

--Josh

Kravvitz
04-04-2006, 01:15 AM
There may be other problems, but here's a big one that I noticed right away.
onSubmit="submitIt(this)"
should be
onsubmit="return submitIt(this)"

infinivert
04-04-2006, 03:15 AM
Dang, I knew it would be something dumb like that.

Thanks so much for taking a second to check it out. That seems to have fixed it!

--Josh