Auto Ajax Form Submission

The Problem

A Project I was working on required that almost every form on the site be submitted via Ajax. We also didn’t want to have to go around the entire web application adding Ajax Calls to all of the sites forms.

The Solution

Some jQuery that would catch the submit event of every form on the web application and parse out the correct data to be able to submit the form correctly.

 The Code

The following file contains most of the JavaScript I used to solve the issue. The code has a lot of comments you can read in order to get a better understanding of what the code is doing.

Download the file, change the extension to .zip, and extract it to get the file.

ajaxFormSubmit

If you have any questions just ask!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s