I'm using some jquery to disable a form submit button after it's been clicked to prevent accidental repeated clicking. This works fine in all browsers except Firefox. In Firefox if the user uses the browser Back button to go back to a page after the submit button disabling has occurred, the submit button is still disabled. Is there any solution to this problem?
Probably, you should add autocomplete="off" parameter to your form
<form autocomplete="off">
<input type="submit" />
</form>
$(document).ready(function() {
$('input[type=submit]', this).attr('disabled', false);
$('#myform').submit(function(){
$('input[type=submit]', this).attr('disabled', true);
});
});
Using jQuery, this will make the button not disabled upon using the back-button on the browser. Tested on FF 3.5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With