Changing the order of buttion actions?

  nitpicker 14:11 24 Oct 08
Locked

Hi, I have a quote request form at click here. When the 'Get Quote' button is clicked an alert box thanks the user and confirms they'll be contacted shortly.

However clicking on the button also checks that all form fields have been completed and displays an alert box saying which fields haven't been completed.

As it is the 'thanks' alert always appears first, but then is followed by the error alert if appropriate. I'd like this to be the other way around, so that they only get the 'thanks' box once the form has successfully been sent.

Can anyone help?

This thread is now locked and can not be replied to.

The Legend of Zelda Breath of the Wild review: Five hours with Zelda on the Nintendo Switch

1995-2015: How technology has changed the world in 20 years

How the painting-like animated sequences in A Monster Calls were created by Glassworks Barcelona

The 22 best Safari extensions | Best Safari plugins: Improve Apple's Safari web browser with these…