ajax - How can I add enctype in my jquery post method -


I tried to add it to my code but it does not appear to be working, it's serialized all my form values And has been posted via eZAX submission, but I am unable to post my filename because it requires an attachment type.

  submitHandler: function () {$ .post 'Abc.php', 'Encipiepe: Multipart / Form-Data', $ ('Form # Job Seker_off'). Serialize (), function (data) {alerts (data. Mgg);}, "jsnu"); }  

You can not upload files using AJAX. You need to use a plugin that uploads the file for you without retrieving the page and returns you the filename. You can then store the return filename in the hidden fields in your form and submit the data using the serialize method.

Check this link for the file upload plugin using AJAX.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -