From 1eb459c44b3dcef69fba9a4e87cf9c3d6289467b Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Wed, 20 Jul 2022 22:54:46 +0200 Subject: [PATCH] add event submit --- web/index.html | 12 ++++++------ web/js/login.js | 13 +++++++++++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/web/index.html b/web/index.html index fe57359..9012602 100644 --- a/web/index.html +++ b/web/index.html @@ -15,8 +15,7 @@ - - + @@ -50,12 +49,12 @@
-
+

Please sign in

- +
@@ -76,5 +75,6 @@ - - \ No newline at end of file + + + diff --git a/web/js/login.js b/web/js/login.js index 5376971..399ee81 100644 --- a/web/js/login.js +++ b/web/js/login.js @@ -1,5 +1,14 @@ instance.get("token", { withCredentials: true}) .then(function(response) { console.log(response) }) .catch(function(error){ - - }); \ No newline at end of file + + }); + +document.getElementById("signin").addEventListener("submit", function(evt){ + evt.preventDefault(); + var email = document.getElementById("floatingEmail"); + var password = document.getElementById("floatingPassword"); + if((password.value.length > 0) || (email.value.length > 0)){ + console.log("request"); + } +}) \ No newline at end of file