const root = document.getElementById("root"); let tableSelectionDomElement = document.getElementById("tabla"); let selectedTable = "tagok"; tableSelectionDomElement.addEventListener("change", function () { selectedTable = tableSelectionDomElement.value; switch (selectedTable) { case "tagok": CreateTagokForm(); break; case "tagsag": CreateTagsagForm(); break; case "jelenlet": CreateJelenletForm(); break; case "esemenyek": CreateEsemenyekForm(); break; case "visszajelzes": CreateVisszajelzesForm(); break; default: break; } disableThis(); }); function disableThis() { tableSelectionDomElement.disabled = true; } function CreateTagokForm() { let form = document.createElement("div"); form.id = "tabla_Form"; form.innerHTML = `
`; root.appendChild(form); return; } function CreateTagsagForm() { //RemoveTable(); let form = document.createElement("div"); form.id = "tabla_Form"; form.innerHTML = ` `; root.appendChild(form); return; } function CreateJelenletForm() { //RemoveTable(); let form = document.createElement("div"); form.id = "tabla_Form"; form.innerHTML = ` `; root.appendChild(form); return; } function CreateEsemenyekForm() { let form = document.createElement("div"); form.id = "tabla_Form"; form.innerHTML = ` `; root.appendChild(form); return; } function CreateVisszajelzesForm() { let form = document.createElement("div"); form.id = "tabla_Form"; form.innerHTML = ` `; root.appendChild(form); return; }