Attached file in form upload with javascript ajax, form post without refresh page. should be attribute enctype=”multipart/form-data”, form id ms_form
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Upload file with ajax var Data = new FormData($("#msform")[0]); $.ajax({ url: "senddata.php", data: Data, processData: false, contentType: false, type:'POST', success: function (response) { $("#msform")[0].reset(); }); |
More Stories
Convert Unix Time to other Time Zone in Java script
Clone (Copy) with selected value using jQuery
html5 capture image from camera