You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script>
function myFunction() {
var input, filter, table, tr, td, i, j, txtValue;
input = document.getElementById("searchInput");
filter = input.value.toUpperCase();
table = document.getElementById("projectTable");
tr = table.getElementsByTagName("tr");
for (i = 1; i < tr.length; i++) { // Start from 1 to skip the header row
tr[i].style.display = "none"; // Hide all rows initially
td = tr[i].getElementsByTagName("td");
for (j = 0; j < td.length; j++) { // Loop through all cells in the row
if (td[j]) {
txtValue = td[j].textContent || td[j].innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = ""; // Show row if any cell matches
break; // Stop checking once a match is found
}
}
}
}
}
</script>
<style>
input[type="text"] {
width: 100%; /* Full width of the container */
padding: 10px; /* Match the padding of table cells */
margin-bottom: 10px; /* Space below the search bar before the table */
border: 1px solid black; /* Match the border of the table */
box-sizing: border-box; /* Ensures padding and border are included in the width */
font-family: Arial, sans-serif; /* Match the font */
font-size: 14px; /* Match the font size */
}
#projectTable {
width: 100%;
border-collapse: collapse;
}
#projectTable th, #projectTable td {
border: 1px solid black;
padding: 10px;
text-align: left;
}
#projectTable th {
background-color: #f2f2f2;
}
</style>