From dd1d3ecfb03fc37662d40d5a005ce4f92f649d3f Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 19 Mar 2024 22:04:50 +0100 Subject: clean up some code --- ui/script.js | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 ui/script.js (limited to 'ui/script.js') diff --git a/ui/script.js b/ui/script.js deleted file mode 100644 index 6a5e457..0000000 --- a/ui/script.js +++ /dev/null @@ -1,15 +0,0 @@ -// Initialize a counter to keep track of the row number -var rowCount = 1; - -// JavaScript for adding a row dynamically at the top -document.getElementById("addRowBtn").addEventListener("click", function() { - var table = document.getElementById("myTable"); - var row = table.insertRow(1); // Insert row at the top of the table - var cell = row.insertCell(0); // Insert cell into the row - cell.innerHTML = "Hallo siem ik ben dit aan het testen. er blijven maar 10 statussen in deze tabel " + rowCount++; // Add content to the cell with incremented counter - var size = table.rows.length; - var lastRowIndex = table.rows.length - 1; // Index of the last row - if (size > 11) { // Check if there is more than one row (excluding the header row) - table.deleteRow(lastRowIndex); // Delete the last row - } -}); -- cgit v1.2.3