diff --git a/index.html b/index.html index 8cc04da..498b818 100644 --- a/index.html +++ b/index.html @@ -72,7 +72,12 @@ fetch(URL, { method: "POST" }) .then(res => res.json()) .then(data => { - console.log(data) + console.log("server response:" + data) + if (data.success) { + alert("Track changed successfully!"); + } else { + alert("Failed to change track: " + data.message); + } }); } @@ -122,6 +127,11 @@ .then(res => res.json()) .then(data => { console.log("Server response:", data); + if (data.success) { + alert("Cars changed successfully!"); + } else { + alert("Failed to change cars: " + data.message); + } }); }