Forum Moderators: open
<head>
<title>Example</title>
</head>
<body>
<table id="table">
<thead>
<tr>
<th>Matricule</th>
<th>Date Exploit</th>
<th>Num RUB</th>
<th>Lib RUB</th>
<th>Date Début</th>
<th>Date Fin</th>
<th>Montant Mois</th>
<th>Taux</th>
<th>Base</th>
</tr>
</thead>
<tbody id="tableBody">
<!-- Datas will be uploaded here -->
</tbody>
</table>
<script>
document.addEventListener('DOMContentLoaded', function () {
async function loadRUBData(limit, offset, month, year) {
// Hardcoded data for testing
const rubData = [{ matricule: '123', dateexpl: '2023-09-01', numrub: '100', librub: 'Test', datedeb: '2023-09-01', datefin: '2023-09-30', montantmois: 1000, taux: 5, base: 500 }];
const tableBody = document.querySelector("#tableBody");
tableBody.innerHTML = "";
for (const entry of rubData) {
const row = document.createElement("tr");
row.innerHTML = `
<td>${entry.matricule}</td>
<td>${entry.dateexpl}</td>
<td>${entry.numrub}</td>
<td>${entry.librub}</td>
<td>${entry.datedeb}</td>
<td>${entry.datefin}</td>
<td>${entry.montantmois}</td>
<td>${entry.taux}</td>
<td>${entry.base}</td>`;
tableBody.appendChild(row);
}
}
}
const limit = 10//${request.getAttribute("limit")};
const offset = 0//${request.getAttribute("offset")};
const month = '09'//${request.getAttribute("month")};
const year = '2023'//${request.getAttribute("year")};
loadRUBData(limit, offset, month, year);
});
</script>
</body>
</html>
<html>
<head>
<title>Example</title>
</head>
<body>
<table id="table">
<thead>
<tr>
<th>Matricule</th>
<th>Date Exploit</th>
<th>Num RUB</th>
<th>Lib RUB</th>
<th>Date Début</th>
<th>Date Fin</th>
<th>Montant Mois</th>
<th>Taux</th>
<th>Base</th>
</tr>
</thead>
<tbody id="tableBody">
<!-- Datas will be uploaded here -->
</tbody>
</table>
<script>
document.addEventListener('DOMContentLoaded', async function () {
// Hardcoded data for testing
const rubData = [
{ matricule: '123', dateexpl: '2023-09-01', numrub: '100', librub: 'Test', datedeb: '2023-09-01', datefin: '2023-09-30', montantmois: 1000, taux: 5, base: 500 }
];
const tableBody = document.querySelector("#tableBody");
tableBody.innerHTML = "";
for (const entry of rubData) {
const row = document.createElement("tr");
row.innerHTML = `
<td>${entry.matricule}</td>
<td>${entry.dateexpl}</td>
<td>${entry.numrub}</td>
<td>${entry.librub}</td>
<td>${entry.datedeb}</td>
<td>${entry.datefin}</td>
<td>${entry.montantmois}</td>
<td>${entry.taux}</td>
<td>${entry.base}</td>`;
tableBody.appendChild(row);
}
});
</script>
</body>
</html>