Skip to content
Advertisement

Change button value on ajax success

I want to be able to change the value of the button from “Submit” to “Submitted” when ajax succeeds.

JavaScript

This works np. But I want it to work when the button is not clicked…In other words the button value “submit” should get changed to “Submitted” when ajax succeeds without the need to click the button again. Any help would be greatly appreciated.Thank you

Advertisement

Answer

For anyone wondering, I couldn’t get $('#ID').html('Submitted') to work.
Instead the following worked np:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement