Onsubmit in Internet Explorer?

Lord, please help me. There is the following code:
...

...

...


...


Works fine in most years. In IE9, the form is sent, no matter what.

Interestingly, on the same computer, in the same IE9 as a different user everything works as intended.

Google a lot of similar questions, but no answer didn't work. If onsubmit="return onSubm();" is replaced by onsubmit="onSubm(); return false;", nothing changes.

How is it possible to win?
October 8th 19 at 00:24
2 answers
October 8th 19 at 00:26
Solution
1) you Have in progress onSubm() throws an exception, as it is written with lots of mistakes and false respectively not returned.
2) Or alternatively, you just disabled the JavaScript.
1) In the same IE9 as a different user everything works as intended, in the developer console there are no error messages not observed
2) if you write an alert appears, the JavaScript still enabled. Settings are all default - micah_Williamson commented on October 8th 19 at 00:29
*if you write - micah_Williamson commented on October 8th 19 at 00:32
And if you write onsubmit="alert(123)"? - antonette.Gislas commented on October 8th 19 at 00:35
Understood yet. It turns out that the user from whom the script was acting weird in IE was enabled compatibility mode, and indeed there was an error in the body onSubm() to return a value (swore at str.trim()) - micah_Williamson commented on October 8th 19 at 00:38
October 8th 19 at 00:28
And if so:

...


?
Will not fire when you press Enter in the input field - micah_Williamson commented on October 8th 19 at 00:31
Why not? It's always worked. - micah_Williamson commented on October 8th 19 at 00:34

Find more questions by tags JavaScriptInternet Explorer