HTML/CSS/JS

Jquery Ajax submit form upload

jQuery Function Code jQuery(document).on(‘click’, ‘.button-custom’, function(){ box1 = new ajaxLoader(“html”); type_submit = jQuery(this).attr(‘id’); var data = new FormData(); data.append( ‘type_submit’, type_submit); data.append( ‘text_1’, jQuery(‘.text_1’).val()); data.append( ‘text_2’, jQuery(‘.text_2’).val()); data.append( ‘text_3’, jQuery(‘#text_3’).val()); data.append( ‘id’, jQuery(‘.hcp_info_id’).val()); data.append( ‘fileToUpload_1’, jQuery(‘input[name=fileToUpload_1]’)[0].files[0]); // data.append( ‘fileToUpload_2’, jQuery(‘input[name=fileToUpload_2]’)[0].files[0]); data.append(“action”, “updateFormDraft”); jQuery.ajax({ type: “POST”, url: ajaxurl, contentType: false, processData: false, data: data, success: function(data){… Continue reading Jquery Ajax submit form upload