If you are creating a HTML form, especially jQuery Ajax driven form, you might want to disable the submit button while page goes into loading mode, because you don’t want user to resubmit same content and cause script failure. To prevent this from happening, we need to disable submit button, here’s how.
Let’s say you have following radio options for the user, and you need to retrieve the value from selected radio button using jQuery.
In this tutorial, we will be creating a simple Ajax-based Contact form using jQuery and PHP. Why Ajax? because your visitors don’t have to reload the page in order to send you email, they can simply click send button and the email gets sent instantly before their eyes, so it’s just fantastic, no more page reloads!