Update index.php

This commit is contained in:
James 2022-09-30 08:20:12 +02:00
parent 5362a73308
commit e1744d25f9

View File

@ -873,15 +873,16 @@
//Fill the tables //Fill the tables
document.getElementById("totalscard").innerHTML = "<table><thead><tr><th>Variable</th><th>Pts</th></tr></thead><tbody>"; document.getElementById("totalscard").innerHTML = "<table><thead><tr><th>Variable</th><th>Pts</th></tr></thead><tbody>";
party_variables.forEach((element, i) => filltable(element, i); party_variables.forEach((element, i) => filltable(party_variables_name, element, i));
encounter_variables.forEach((element, i) => document.getElementById("totalscard").innerHTML += "<tr>" + encounter_variables_name[i] + "</tr>" + "<tr>" + element + "</tr>"); encounter_variables.forEach((element, i) => filltable(encounter_variables_name, element, i));
//encounter_variables.forEach((element, i) => document.getElementById("totalscard").innerHTML += "<tr>" + encounter_variables_name[i] + "</tr>" + "<tr>" + element + "</tr>");
document.getElementById("totalscard").innerHTML += +"</tbody></table>"; document.getElementById("totalscard").innerHTML += +"</tbody></table>";
} }
function filltable(element, i) { function filltable(namespace, element, i) {
document.getElementById("totalscard").innerHTML += "<tr><td>" + party_variables_name[i] + "</td><td>" + element + "</td></tr>") document.getElementById("totalscard").innerHTML += "<tr><td>" + namespace[i] + "</td><td>" + element + "</td></tr>")
} }
function setDiff(difficulty) { function setDiff(difficulty) {