3
When using this JS code, using Jquery:
$(document).ready(function(){
$('.visualizar').click(function(){
$('#container').fadeIn(300);
});
});
function visualizarDados(codContato){
//↓ função do ajax para mandar informações para a modal.php
$.ajax({
type: "GET",
url: "modal.php",
data: {codigo:codContato},
success: function(dados){
$('#modal').html(dados);
}
});
}
The modal does not work and this error is shown in the browser console:
[Deprecation] Synchronous Xmlhttprequest on the main thread is deprecated because of its detrimental effects to the end user’s Experience. For more help, check https://xhr.spec.whatwg.org/.
I researched and talk has something to do with AJAX being synchronous, but as I don’t have much experience in AJAX or jQuery, I didn’t understand how to solve.