diff --git a/script.js b/script.js deleted file mode 100644 index 537a37d..0000000 --- a/script.js +++ /dev/null @@ -1,42 +0,0 @@ -const button = document.getElementById('submit'); -const page = document.getElementById('page'); - -const check = document.getElementsByClassName('check'); -const excla = document.getElementsByClassName('excla'); -const entry = document.getElementsByClassName('entry'); -const help = document.getElementsByClassName('help'); - - -function displayHelp(id) { - id.style.display = 'block'; -} - -function hideHelp(id) { - id.style.display = 'none'; -} - -function checkInputs() { - for (let i=0; i < entry.length ; i++) { - console.log(i); - if (entry[i].type != 'button') { - if (entry[i].value == '') { - setError(i); - } - else { - setSuccess(i); - } - } - } -} - -function setError(indice) { - check[indice].style.display = 'none'; - excla[indice].style.display = 'block'; - document.getElementsByTagName('small')[indice].style.display = 'block'; -} - -function setSuccess(indice) { - check[indice].style.display = 'block'; - excla[indice].style.display = 'none'; - document.getElementsByTagName('small')[indice].style.display = 'none'; -}