How can I prevent the user from double clicking submit button on my signup form which is an ajax partial view?
I regret to ask since this would have
Try with the following script:
$('form').submit(function () {
if ($(this).valid()) {
$(':submit', this).attr('disabled', 'disabled');
}
});
Make sure you execute it also in the success callback of your AJAX request in order to reattach the submit event when the form is replaced with a new content in the DOM, or the second time it might no longer work.