I have two JavaScript functions that are triggered by the same button, one that is responsible for validations and another that pushes the page forward.
I can not add these functions or change the page progress, since it is done by the company's own framework, I can only manipulate the validation function.
The problem is that even inserting return null
into the validation function, the forward page function is triggered, that is, the form is validated but the page progresses anyway.
For reasons of confidentiality I can not show the code, but I hope the situation is clear.
So if I have the following situation:
onClick="functionValidacao(); functionAvancarPagina();"
How to "undo" functionAvancarPagina()
if functionValidacao()
points errors?