Commit ed8ae993 authored by uoure's avatar uoure
Browse files

Delete stornoScripts.js

parent 3426a5d4
function showReservation() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
if (this.responseText == "-1") {
document.getElementById("reservationView").innerHTML = "Für diesen Code gibt es keine Reservierung";
} else {
document.getElementById("reservationView").innerHTML = this.responseText;
document.getElementById("cancelButton").classList.remove("hiddenInput");
}
}
};
xhttp.open("POST", "showReservation.php", true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send("code=" + document.getElementById("code").value);
}
function cancelReservation() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
if (this.responseText == "1") {
document.getElementById("reservationView").innerHTML = "Erfolgreich storniert";
document.getElementById("cancelButton").classList.add("hiddenInput");
} else {
document.getElementById("reservationView").innerHTML = "Es ist ein Fehler aufgetreten. Die Reservierung hat vielleicht schon begonnen oder der Code ist nicht gültig.";
}
}
};
xhttp.open("POST", "cancelReservation.php", true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send("code=" + document.getElementById("code").value);
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment