AJAX FORMS

Posting multipart forms

This page shows how to post a multipart HTML form (i.e. sending also files) with jQuery and Ajax. For an example of posting a basic form, see previous example.

Result of the submit process can be inspected by checking content of the backend/uploads directory on the server.

Remark: upload has been disabled on this demo for security reason. In order to try the file upload feature, you should download this HTML page and create your own backend form controller.

The POST data are sent (silently) to the this form controller.

This form submit the attached file using a (silent) Ajax call:

The same form as above, but submitting data as a simple HTTP post (plain old HTML approach):

For details have a look to HTML code of this page.

Sources

HOME