jQuery("form#add-group-form").submit(function(e){
e.preventDefault();
var formData = new FormData(jQuery(this)[0]);
jQuery.ajax({
type:"POST",
url:jQuery(this).attr("action"),
data:formData,
processData: false,
contentType: false,
dataType: "json",
success: function(response){
alert(response);
}
});
});
e.preventDefault();
var formData = new FormData(jQuery(this)[0]);
jQuery.ajax({
type:"POST",
url:jQuery(this).attr("action"),
data:formData,
processData: false,
contentType: false,
dataType: "json",
success: function(response){
alert(response);
}
});
});
No comments:
Post a Comment