Stand 17.02.2023
This commit is contained in:
43
js/components/admin_erfassen.js
Normal file
43
js/components/admin_erfassen.js
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
function onClickDelete(id){
|
||||
|
||||
document.getElementById("antwort").value= "";
|
||||
r = confirm('Antwort löschen?');
|
||||
if(r) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_erfassen.php',
|
||||
data: {
|
||||
'function': 'delete',
|
||||
'tabelle': 'jumi_umfragen_antworten',
|
||||
'spalte': 'uaid',
|
||||
'id': id
|
||||
},
|
||||
success: function(result){
|
||||
// document.getElementById("del").innerHTML = "<strong>entfernt</strong>";
|
||||
//Text einblenden geht nicht, da ein Refresh gemacht wird. Dann sieht man den Text nicht
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function onClickDeleteQuestion(id2){
|
||||
document.getElementById("frage").value = "";
|
||||
document.getElementById("antwort").value= "";
|
||||
r = confirm('Gesamte Frage löschen?');
|
||||
if(r) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_erfassen.php',
|
||||
data: {
|
||||
'function': 'deleteQuestion',
|
||||
'id2': id2
|
||||
},
|
||||
success: function(result){
|
||||
// document.getElementById("del").innerHTML = "<strong>entfernt</strong>";
|
||||
//Text einblenden geht nicht, da ein Refresh gemacht wird. Dann sieht man den Text nicht
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user