So I'm setting up a system for a small workplace, and I'm trying to run a live search on keyup that pulls a table of users. Each row has another button that can run a separate Ajax search for that specific user's clock in hours. How can I avoid or fix this deprecated issue?
I've tried using the .load() and the jQuery.ajax() functions on both data pulls, specifically tried the jQuery.ajax() to turn off async hoping that would work, but nothing has worked so far. The exact error states: "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience."
For the people thinking this is a duplicate, the only other situation some asks for the same help on this site is when they were using the console.log() function, this problem is directly from PHP data pulling.
1st load :
$("#liveSearch").keyup(function(){
var str = $(this).val();
url: "manage/search.php?searchBy=ID&material="+str,
success: function (result) {
$("#searchResult).html(result);
}
});
2nd load :
function callUser(user, period, week){
jQuery.ajax({
url : "manage/print.php?id="+user+"&p="+period+"&week"+week,
success: function(result) {
$("#result").html(result);
}
});
}
All that I need is for the information to both be pulled while keeping the PHP queries in tact.