Loading index.html +11 −2 Original line number Diff line number Diff line Loading @@ -11,10 +11,19 @@ <input type="search" id="codePostalInput" placeholder="Entrez votre code postal" aria-label="code postal"><button id="recherche" >Rechercher</button> <br> <select id="villeListe" class="cache" aria-label="ville"> <div id="choixVille" class="cache"> <select id="villeListe" aria-label="ville"> <option>--Sélectionner une ville--</option> </select> <label>Nombre de jours :</label> <input id="inputNbJours" type="number" value="1" min="1" max="7"></input> <button id="voirInformations">Voir les informations</button> </div> <label>Nombre de jours :</label> <input id="inputNbJours" type="number" value="1" min="1" max="7"></input> Loading js/interface.js +6 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,11 @@ // Interface const barreRechercheCodePostal = document.getElementById("codePostalInput"); const boutonRechercheCodePostal = document.getElementById("recherche"); const conteneurChoixVille = document.getElementById("choixVille"); const listeDeroulanteVilles = document.getElementById("villeListe"); const inputNombreJours = document.getElementById("inputNbJours"); const boutonVoirInformations = document.getElementById("voirInformations"); boutonRechercheCodePostal.addEventListener("click", onRechercher); listeDeroulanteVilles.addEventListener("change", onSelectionneVille); Loading Loading @@ -39,7 +43,7 @@ function onRechercher(){ function onErreurSaisieCodePostal(message){ alert(message); listeDeroulanteVilles.classList.add("cache"); conteneurChoixVille.classList.add("cache"); zoneResultats.classList.add("cache"); } Loading @@ -49,7 +53,7 @@ function listeVille(){ villes_insee.forEach((ville, codeInsee) => { listeDeroulanteVilles.innerHTML += `\n<option value="${codeInsee}">${ville}</option>` }); listeDeroulanteVilles.classList.remove("cache"); conteneurChoixVille.classList.remove("cache"); } const setVilles = async codepostal => { Loading Loading
index.html +11 −2 Original line number Diff line number Diff line Loading @@ -11,10 +11,19 @@ <input type="search" id="codePostalInput" placeholder="Entrez votre code postal" aria-label="code postal"><button id="recherche" >Rechercher</button> <br> <select id="villeListe" class="cache" aria-label="ville"> <div id="choixVille" class="cache"> <select id="villeListe" aria-label="ville"> <option>--Sélectionner une ville--</option> </select> <label>Nombre de jours :</label> <input id="inputNbJours" type="number" value="1" min="1" max="7"></input> <button id="voirInformations">Voir les informations</button> </div> <label>Nombre de jours :</label> <input id="inputNbJours" type="number" value="1" min="1" max="7"></input> Loading
js/interface.js +6 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,11 @@ // Interface const barreRechercheCodePostal = document.getElementById("codePostalInput"); const boutonRechercheCodePostal = document.getElementById("recherche"); const conteneurChoixVille = document.getElementById("choixVille"); const listeDeroulanteVilles = document.getElementById("villeListe"); const inputNombreJours = document.getElementById("inputNbJours"); const boutonVoirInformations = document.getElementById("voirInformations"); boutonRechercheCodePostal.addEventListener("click", onRechercher); listeDeroulanteVilles.addEventListener("change", onSelectionneVille); Loading Loading @@ -39,7 +43,7 @@ function onRechercher(){ function onErreurSaisieCodePostal(message){ alert(message); listeDeroulanteVilles.classList.add("cache"); conteneurChoixVille.classList.add("cache"); zoneResultats.classList.add("cache"); } Loading @@ -49,7 +53,7 @@ function listeVille(){ villes_insee.forEach((ville, codeInsee) => { listeDeroulanteVilles.innerHTML += `\n<option value="${codeInsee}">${ville}</option>` }); listeDeroulanteVilles.classList.remove("cache"); conteneurChoixVille.classList.remove("cache"); } const setVilles = async codepostal => { Loading