Help with onClick Javascript on Submit Button

Cancelled

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.

Skills: Amazon Web Services, Engineering, Javascript, MySQL, PHP, Project Management, Software Architecture, Software Testing, Web Hosting, Website Management, Website Testing

See more: salesforce javascript button, email message salesforce, button onclick php, javascript validation, html salesforce, help with javascript, html button click email message, javascript submit form email address, javascript tracking, http submit, salesforce email, click button without, javascript salesforce, clicked email address email tracking, submit http, meaning action, stop button, php javascript address, tracking solution website, click button html, click html button, javascript problem solution, stop javascript, mootools submit form, php salesforce

Project ID: #3740896

5 freelancers are bidding on average $13 for this job

tuncaydemirtepe

See private message.

$17 USD in 1 day
(113 Reviews)
6.2
umnuscom

See private message.

$12.75 USD in 1 day
(117 Reviews)
5.8
mnadeemshafi

See private message.

$14.45 USD in 1 day
(58 Reviews)
5.0
ztrekrvw

See private message.

$8.5 USD in 1 day
(30 Reviews)
4.1
expert175

See private message.

$12.75 USD in 1 day
(0 Reviews)
0.0