This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Foodloop-Server/public/static/user/js/home.js

25 lines
524 B
JavaScript
Raw Normal View History

$(function() {
$('form#receipt-form').submit(function( event ) {
event.preventDefault();
event.stopPropagation();
// Create new form data object with the contents of this form
var formData = new FormData(this);
$.ajax({
url: $(this).attr("action"),
type: 'POST',
data: formData,
success: function(data) {
alert(data);
},
cache: false,
contentType: false,
processData: false
});
// Stop propogation of event
return false;
});
});