'JavaScript IE double submit with form.submit()

I am experiencing difficulties with IE (8, 11) double submit which is triggered by JavaScript code:

this.disabled=true; 
form.submit(); 
return false;

Sentence form.submit(); actually triggers 2 threads in jsp. Other browsers Firefox and Chrome work OK and only one thread is triggered. I have to use plain JavaScript and no jQuery.

What am I doing wrong?



Solution 1:[1]

Well you are returning false in the function, but that does nothing when you do not handle it in the click event. You need to add return.

<input type="button" name="button1" SIZE="40" value="Confirm" onclick="return confirmFunction()"> 
                                                                       ^^^^^^^

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 epascarello