I'd like to disable a submit button after it's pressed using javascript.
myForm.onsubmit = function() { ... mySubmitButton.disabled = true; ... }
But when a user stops opening a new page while the current is still alive, the button remains Disabled.
The same result there will be if the content from server is a file (there will be no redirection to a new page in this case).
Is there a way to determine if the browser doesn't 'want' to load a new URL any more and re-enable mySubmitButton?