Your code is changing the submit action of the form. Instead of submitting, it changes the button attribute.
Try this:
$('input[type=submit]').click(function() {
$(this).attr('disabled', 'disabled');
$(this).parents('form').submit();
});
More Related Contents:
- jQuery’s .on() method combined with the submit event
- submit form does not stop in jquery ajax call
- jQuery detect click on disabled submit button
- Using JQuery – preventing form from submitting
- jQuery: how to get which button was clicked upon form submission?
- Clear form fields with jQuery
- val() vs. text() for textarea
- jQuery: serialize() form and other parameters
- JavaScript: how to change form action attribute value based on selection?
- validating multiple textbox having same name with jquery validator validates only first input
- How to send image to PHP file using Ajax?
- How to add additional fields to form before submit?
- jQuery AJAX form submits twice
- Prevent redirect after form is submitted
- How to change an element’s title attribute using jQuery
- Dynamically create and submit form
- Property ‘submit’ of object # is not a function
- How to use jQuery to add form elements dynamically
- calculate the number of html checkbox checked using jquery
- Is there a way to clone form field values in jQuery or javascript?
- Jquery toggle event is messing with checkbox value
- Retrieving HTTP status code from loaded iframe with Javascript
- How to reset radiobuttons in jQuery so that none is checked
- How to make Chrome remember password for an AJAX form?
- Disable scrolling when changing focus form elements ipad web app
- Ajax Form submit with preventDefault
- HTML5 textarea placeholder not appearing
- HTML5 validation before ajax submit
- Is there a better jQuery solution to this.form.submit();?
- How do I select the parent form based on which submit button is clicked?