33 lines
908 B
JavaScript
33 lines
908 B
JavaScript
window.onload = function () {
|
|
document.getElementById("idList").onclick = function (event_opl) {
|
|
if (event_opl.target.tagName.toLowerCase() == 'td') {
|
|
id = event_opl.target.parentNode.id;
|
|
if (id != "") {
|
|
document.getElementById(id).className = "";
|
|
}
|
|
|
|
|
|
console.log(id);
|
|
document.getElementById(id).className = "selected";
|
|
}
|
|
}
|
|
|
|
document.getElementById("New").onclick = function (event_opl) {
|
|
window.location.href = "/detail/?cat=Studenten" ;
|
|
}
|
|
|
|
|
|
document.getElementById("Modify").onclick = function (event_opl) {
|
|
if (id != "")
|
|
window.location.href = "/detail/?cat=Studenten&id=" + id;
|
|
}
|
|
|
|
document.getElementById("Delete").onclick = function (event_opl) {
|
|
if (id != "")
|
|
if (confirm("Soll der Eintrag wirklich geloescht werden?")) {
|
|
window.location.href = "/delete/?cat=Studenten&id=" + id;
|
|
}
|
|
|
|
}
|
|
|
|
} |