diff --git a/form.html b/form.html index cb3c2b5..0348729 100644 --- a/form.html +++ b/form.html @@ -263,6 +263,17 @@ contactForm.addEventListener("change", function changeEventHandler(e) { document.getElementById("submitButton").classList.add("disabled"); } }); + +fetch("https://contact.vicky.rampin.org/availability") +.then(function(response) { + if(response.status !== 200) { + throw new Error(); + } + return response.json(); +}) +.then(function(obj) { + console.log(obj.availability); +});