I have a form that has 2 button options when complete: submitting the form and directing to a confirm page or submitting the form/listing another account and not directing to the confirm page.
I want to have the fields validated first and then be submitted and be directed accordingly (either to the confirm page or to stay on the form and fill out another entry)
I have 2 functions: one validates that certain fields are filled out and one that checks which button is clicked. Both work separately, the validation script is called w/ onsubmit, and the button click function is called w/ an onclick function-I’m pretty sure this is the problem…
So, how do I run the validate function first, and then the button click function?
Please help- I am new to javascript so the simpler the better.