I have created a form in html.
I have added event listener
on file browsing field and also there is some condition to be checked before submitting the form.
So i have used
onsubmit="return myfunction()"
If myfunction is returning false, an alert window pops. On clicking on the 'ok' of alert window the form is getting submitted.
Also the onsubmit action is not working everytime. It works just once. So next time if I entry invalid details in form and click Submit the form is submitted. Is there anything that I am missing ?