Reputation: 61
Say a submit button has a click event handler as well (yes, it's wrong, but that's really the code I'm working on).
And the click handler sets a value in a field of the form that's about to be submitted.
So when the submit button is clicked:
Note: I'm not looking for alternatives and advice. I know what the proper way of handling this will be. Just trying to understand the sequence of events and their implications.
Upvotes: 6
Views: 2938
Reputation: 943686
Upvotes: 5
Reputation:
First will be called event, there You have last chance f.ex to block form submitting. Then submit with changed values by event routine.
Upvotes: 0