<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Inserimento dati</title>
<link href=" https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body onload="loadtab()">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="inserimentodati.html"><b style="color:rgb(4, 243, 4);">ATK</b> <b style="color:white;">BIND</b><b style="color:red;">INGS</b></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="inserimentodati.html">Grafica scatole</a>
</li>
<li class="nav-item">
<a class="nav-link" href="anagrafica.html">Anagrafica Prodotto</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">#####</a>
</li>
</ul>
</div>
</nav>
<!--fine menu-->
<br>
<h1>Anagrafica Prodotti</h1>
<br>
<label for="ricerca"><b>Cerca per codice articolo</b></label>
<input type="text" id="ricerca" onkeyup="cerca()" name="ricerca" placeholder="Cerca..."><br/><br/>
<br>
<!--tabella-->
<table class = "table table-light table-striped">
<tr>
<th>codice articolo</th>
<th>descrizione</th>
<th>catomo</th>
<th>ispeziona</th>
</tr>
<tbody id = "tab">
</tbody>
</table>
</body>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2"crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <!-- intestazioni per app json , css,ajax-->
<script>
function funz(btn){
var w = window.open("prodotto.html","prodotto.html","width=500,height=500");
window.but = btn
}
function loadtab() {
const xmlhttp = new XMLHttpRequest();
xmlhttp.onload = function() {
document.getElementById("tab").innerHTML = this.responseText;
}
xmlhttp.open("GET", "pimloadtab.php");
xmlhttp.send();
}
function cerca() {
var input, filter, table, tr, td, i, txtValue;
input = document.getElementById("ricerca");
filter = input.value.toUpperCase();
table = document.getElementById("tab");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[0];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
</html>