Well the thing is there is already a edited form with a lot of fields but all the save and validate goes trough ajax. They asked me now to put a file upload , i tough that just will be set a input and get it on back , but since all goes trough ajax i cant.
I don't want to change all the function and go trough a submit if it's not necessary. I looked for some uploaders of file trough ajax but all of them are type drag and drop and i don't like them because y only need a simple file. And the ones that i found that looked simple where in flash...
Is there any simple script that allows me to upload a simple file trough ajax without need of change the type of submitting the fields.
Thank's in advance mates ;)
//the js that saves all the inputs function _edit_campaign(){ var data = formvalues_inspinia("body"); data.action=_action; data.status=$("#smf_ior_status").val(); $.ajax({ url: "/save_changes", dataType: "json", data: data, method:"POST", success: function (response) { if(!response.status){ toastr_error(response.desc); $( "#submit_confirm" ).prop( "disabled", false ); $("#"+response.camp).focus(); }else{ toastr_success(response.desc); } } }); }