0
when I try to pass the value of a select to an onChange function, by clicking on the button it gives the following error in the console:
[Violation] Added non-passive Event Listener to a scroll-blocking 'mousewheel' Event. Consider marking Event Handler as 'Passive' to make the page more Responsive.
ERROR CODE (page where the data is fetched)
<?php
//Conectando ao banco de dados
$con = new mysqli("localhost", "root", "", "tcc");
if (mysqli_connect_errno()) trigger_error(mysqli_connect_error());
//Consultando banco de dados
$qryLista = mysqli_query($con, "SELECT * FROM postagens");
while($r = mysqli_fetch_assoc($qryLista)){
?>
<table id='tabela'>
<tr>
<td><?= $r['id'] ?></td>
<td><?= $r['nome'] ?></td>
<td><?= $r['rua'] ?></td>
<td><?= $r['bairro'] ?></td>
<td><?= $r['telefone'] ?></td>
<td><?= $r['descricao'] ?></td>
<td>
<select id='sel1'>
<option value='status'><?= $r['status'] ?></option>
<option value='pendente'>Pendente</option>
<option value='recolhido'>Recolhido</option>
</select></td>
</table>
<?php
}
?>
page snippet where this javascript function
<script src="source\jquery-3.2.1.min.js"></script>
<script>
$(document).ready(function () {
$('.sel1').on('change', function () {
var selecionado = $(this).val();
var selecionado_id = $(this).attr('data-id');
$.ajax({
data: "id=18&selecionado=recolhido",
type: 'post',
url: 'status.php',
});
});
</script>
<script>
//REFRESH FUNCTION ON THE PAGE
function load() {
$("#tabela").load("getdados.php", null, function () {
$(".loading-div").hide();
});
};
$(document).ready(function () {
load();
setInterval(function () {
load();
}, 8000);
});
</script>
</head>
Bem vindo
<?php echo $nome;?> <p>
<?php echo $email;?><p>
<a href="sair.php">Sair</a></p>
<body>
<div class ="container-fluid">
<table class="table table-hover">
<thead>
<tr>
<td>id</td>
<td>nome</td>
<td>rua</td>
<td>bairro</td>
<td>telefone</td>
<td>materiais</td>
<td>Status</td>
</tr>
<tbody id="tabela">
</tbody>
is already edited
– caio
This is not an error, it’s a series of checks that are being implemented in the developer tools of Chrome and Chromium, are performance tests generally, I will look for the Google link that quotes this and send you.
– Guilherme Nascimento