How To Send A Input File Type Via Javascript In Joomla Modules
I want to send a file with javascript to php file . I have this form in my php file
Solution 1:
Try this:
$(document).on("click","#poi", function(e) {
e.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
url: 'helper.php',
type: 'POST',
data: formData,
async: false,
beforeSend: function() {
$("#message1").show().html("uploading...");
},
success: function(data) {
$("#message1").fadeOut();
$("#container").html(data);
},
cache: false,
contentType: false,
processData: false
});
});
Post a Comment for "How To Send A Input File Type Via Javascript In Joomla Modules"