Gente
Scusate ma sto impazzendo .... ho creato un form e vorrei inviarlo con AJAX essendo lo stesso all'interno di un overlay; il problema che non mi prende il campo File ...
Ho visitato un monte di post anche su Stackoverflow ma non trovo la soluzione al mio errore.
Mi aiutate a risolvere l'errore ?
Volendo è testabile anche su https://www.groupedelite.com/test/validadeplugin.htmcodice HTML:$(document).ready(function () { $("#btnSubmit").click(function (event) { //stop submit the form, we will post it manually. event.preventDefault(); // Get form var form = $('#myform')[0]; // FormData object var data = new FormData(form); // If you want to add an extra field for the FormData data.append('documento', $('input[type=file]')[0].files[0]); // disabled the submit button $("#btnSubmit").prop("disabled", true); $.ajax({ type: "POST", enctype: 'multipart/form-data', data: data, url: "invia.asp" }); }); });

Rispondi quotando