Hey guys, I have a simple form with a submit button:
<form onsubmit="return someFunc()"> <!-- --> <input type="submit" value="Log In"></submit> </form>
So the structure of
someFunc() is it validates the form, and displays a success animation if the validation returns true. However, I never get to see the animation, because if the form submits correctly, the site reloads. How do I stop this? I looked at StackOverflow, but a bunch of people just suggest turning the input into a plain button (which I don’t want, because the submit button also sends data to the backend).