For past few days i have been struggling to submit a form with jQuery and AJAX. The problem i\'m facing is to upload the image in the form field.
My form is somethin
Try this code. using formData()
formData()
$("form").submit(function (event) { var formData = new FormData($(this)); $.ajax({ url: url, type: 'POST', data: formData, async: false, success: function (data) { //success callback }, cache: false, contentType: false, processData: false }); });
Submit