I am bit confuse on this Javascript function
When to use return false or event.preventdefault() ?
I'm working on my first web app, and I want user to completely enter the required input in my forms
I have read some article about this, googling, surfing everywhere, some says return false, and other side says event.preventdefault()
ex
if (InputA == '' || inputA == 0) {event.preventdefault()}
or if (InputA == '' || inputA == 0) {return false}
What is the different ? Is this will completely stop the form from submitting inputed value to DB ?
Any help will be appreciated
Thanks !