S
S
ssbxlan2012-04-11 15:06:28
JavaScript
ssbxlan, 2012-04-11 15:06:28

Onsubmit in Internet Explorer?

Lord, please help. There is the following code:
...
<script language="javascript">
function onSubm(){
...
return false;
}
</script>
...
<form ... onsubmit="return onSubm();">
...
<input type="submit" />
</form>
...
Works fine in most browsers. In IE9, the form is submitted no matter what.
Interestingly, on the same computer, in the same IE9 under a different user, everything works as intended.
There are a lot of similar questions googled, but none of the answers worked. If onsubmit="return onSubm();" replace with onsubmit="onSubm(); return false;", nothing changes.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
egorinsk, 2012-04-11
@ssbxlan

1) An exception is thrown during the onSubm() operation, since it is written with a bunch of errors, and false is not returned accordingly.
2) Or alternatively, you just have javascript disabled.

M
MiXei4, 2012-04-11
@MiXei4

And if so:
<form… >

<input type="submit" onclick="return onSubm();"/>
</form>
?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question