-
Hello, There are different ways to define a submit eventhandler of a form: D1. in the form element: ...form id="f1" onsubmit="alert('test')".. There are also different ways to execute the submission of a form: E1. With a submit button E2. With javascript submit() E3. With javascript requestSubmit() E4. with jquery trigger("submit") I found this while migration from D1 to D2 and now the events are not executed any more (i am using E4). I could migrate from D1 to D3. Or i stay with D2 and also migrate from E4 to E3. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In general, jQuery only calls event handlers that are attached by jQuery when a method like |
Beta Was this translation helpful? Give feedback.
In general, jQuery only calls event handlers that are attached by jQuery when a method like
.trigger()
is used. Each time you attach an event handler, jQuery adds it to a list of handlers so that it can be called if you use.trigger()
. jQuery doesn't know what event handlers may have been attached by other methods. There may be some exception that I'm not thinking about, but that's the general rule.