سلام و درود
ببخشید من یه مشکلی دارم که هرچی تست میکنم این کدم درخواستو به فایل ajaxHandler ارسال میکنه، هرچی بررسیش کردم مشکل و خطایی توش ندیدم ، امکانش هست بررسیش کنید ببینید جایی رو اشتباه وارد کردم که درخواست اصن به فایل مقصد نمیرسه یا نه همش درسته ؟
<script>
$(document).ready(function() {
$('#addFolderBtn').click(function(e) {
var input = $('input#addFolderInput');
$.ajax({
url: "process/ajaxHandler.php",
method: "POST",
data: {
action: "addFolder",
folderName: input.val()
},
success: function(response) {
if (is_numeric(response)) {
var newFolderId = response;
$('<a href="?folder_id ="' + newFolderId.val() + '"><i class="fa fa-folder"></i>' + input.val() + '</a>').appendTo('ul.folders-list');
} else {
alert(response);
}
}
});
});
$('#addTaskInput').on('keypress', function(e) {
if (e.which == 13) {
$.ajax({
url: "process/ajaxHandler.php",
method: "POST",
data: {
action: "addTask",
foldeId: <?= $_GET['folder_id'] ?>,
taskTitle: $('#addTaskInput').val()
},
success: function(response) {
if (response == 1) {
//
} else {
alert(response);
}
}
});
}
});
});
</script>