Q:

Form submit button stays disabled after ajax post

I have a page with multiple forms on it for a CRM i am building. Each form is named, etc so there is no problems in that regard. I do however encounter an issue where after $.post() is made, the submit button remains disabled.
Below is my universal post handler for form submissions
    $("form")
        .bootstrapValidator()
        .on('success.form.bv', function(e) {
            // Prevent form submission
            e.preventDefault();

            // Get the form instance
            var $form = $(e.target);

            // Get the BootstrapValidator instance
            var bv = $form.data('bootstrapValidator');
            console.log($form.serialize());
            $.post( "/post/", $form.serialize(), function(data) {
                    if(data) {
                        toastr.success("The form data has been updated.","Form Saved");
                    } else {
                        toastr.error("Please try to save again.","Failed");
                    }
                } , "json" // I expect a JSON response
            ).error(function() {
                    toastr.error("Please try to save again.","Failed");
            });

    });

Is there a generic way to re-enable the submit button of the current form. There is a lot of nested HTML so the location of the button varies from form to form.
Thanks in advance.

A:

I'm not sure what is your disabled means, does it mean the html tag disabled?
If so can use Jquery to remove the disabled attr?
under your $.post function add this jquery line to remove the Attribute?
$.post( "/post/", $form.serialize(), function(data) {    
    $form.find("input[type=submit]").removeAttr('disabled');

