Help with onClick Javascript on Submit Button

Cancelado Publicado Sep 22, 2010 Pagado a la entrega
Cancelado Pagado a la entrega

I need help solving a subscription form problem:

I'm using mootools validation for my form which works great. The form's action is linked with a SalesForce tracking and this works great.

What I also want to do is when the submit button is clicked, it forwards the person to another page on the website.

I can do this with:

onClick="parent.location='[url removed, login to view]'"

...but my problem is that it will click through even if the form isn't validated. Meaning, if someone clicks submit without entering their email address, the form's action won't work (because the form didn't validate) but it will still bounce the person to the new page.

How can I stop the onClick from happening if the form isn't validated? Does anyone have a solution to this problem? I can provide a URL if requested in private message.

Amazon Web Services Ingeniería JavaScript MySQL PHP Gestión de proyectos Arquitectura de software Verificación de software Web Hosting Gestión de páginas web Verificación de páginas web

Nº del proyecto: #3740896

Sobre el proyecto

5 propuestas Proyecto remoto Activo Oct 7, 2010

5 freelancers están ofertando un promedio de $13 por este trabajo

tuncaydemirtepe

See private message.

$17 USD en 1 día
(113 comentarios)
6.2
umnuscom

See private message.

$12.75 USD en 1 día
(117 comentarios)
5.8
mnadeemshafi

See private message.

$14.45 USD en 1 día
(58 comentarios)
5.0
ztrekrvw

See private message.

$8.5 USD en 1 día
(30 comentarios)
4.1
expert175

See private message.

$12.75 USD en 1 día
(0 comentarios)
0.0