Skip to content

Commit

Permalink
update form task
Browse files Browse the repository at this point in the history
  • Loading branch information
jggj21 authored Aug 29, 2024
1 parent a448e67 commit faf5d64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion resources/views/tasks.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,18 @@
console.log($(this).attr('action'));
var formData = new FormData(this);
var taskId = $('#editTaskId').val();
var taskName = $('#editTaskId').val();
var updateUrl = '/task/' + taskId;
console.log({taskId, formData});
for (var pair of formData.entries()) {
console.log(pair[0]+ ': ' + pair[1]);
}
$.ajax({
url: updateUrl,
type: 'PUT',
data: formData,
data: {
name: taskName
},
processData: false,
contentType: false,
success: function (response) {
Expand Down

0 comments on commit faf5d64

Please sign in to comment.