ajax file upload from modal
<form enctype="multipart/form-data" id="modal_form_id" method="POST" >
<input type="file" name="documents">
</form>
var postData = new FormData($("#modal_form_id")[0]);
$.ajax({
type:'POST',
url:'your-post-url',
processData: false,
contentType: false,
data : postData,
success:function(data){
console.log("File Uploaded");
}
});
Also in JavaScript:
- js vanilla detect any input
- remove whitespace with regex javascript
- react hero slider
- multiple case switch javascript
- go to another page javascript
- node mailer office 365
- vue js Elements in iteration expect to have 'v-bind:key' directives
- jest it vs test
- jquery dropdown select
- use effect react
- stripe stripe js
- javascript remove event listener
- post fetch call
- javascript dictionary
- node js mysql starter github
- sequelize where more than
- tesseract.js
- tensorflow js cdn
- javascript remove element
- urlencode jquery
- how to check if 2 sprites are touching js
- npm err! 503 service unavailable proxy
- if typeof equals array javascript
- angular http error handling