0

I have a form that submits via jquery post. the result of the query returns text which is populated into a div below the form.

The form works and returns data but the form submit button doesn't 'unclick' or reset. the jquery code I have tried includes:

$( '#my_form' ).each(function(){
    this.reset();
});

&

$('#my_form')[0].reset();

the input text boxes are reset but not the submit button - meaning that the form cant be submitted again, is their a command to reset the submit button such as 'removeAttr('checked')'?

2
  • The submit button is'nt disabled by default when submitting a form with ajax, there is code somewhere in your javascript that does that. Find that code and remove it. Commented May 17, 2013 at 22:00
  • did you disabled the button after the post was made ??? coz i don't think it gets disabled by default after the form submission Commented May 17, 2013 at 22:01

1 Answer 1

1

Try this -

$('#my_form input:submit').prop('disabled',false);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.