v0.0.8 Ajax now works with backend

This commit is contained in:
Victor
2021-06-04 12:34:47 +02:00
parent c7fa37a3ae
commit 4ce94621a7
5 changed files with 22 additions and 33 deletions
+4 -11
View File
@@ -1,22 +1,15 @@
$("#submit").click(function(){
var $title = $("#title");
var $description = $("#description");
var data = {
title: $title.val(),
description: $description.val(),
title: $("#title").val(),
description: $("#description").val(),
};
console.log(data);
$.ajax({
url: '../Backend/controller/upload.php',
type: 'POST',
data: data,
contentType: 'application/json; charset=utf-8',
success: function () {
console.log("Dansker bingo")
success: function (data) {
console.log(data)
},
error: function () {
console.log("error");
+1 -3
View File
@@ -13,6 +13,4 @@ $( document ).ready(function() {
console.log(data);
}
});
});
});