diff --git a/films.html b/films.html index 82671d7..fb70906 100644 --- a/films.html +++ b/films.html @@ -23,7 +23,7 @@
-
+ diff --git a/scripts/films.js b/scripts/films.js index f0d931d..188c173 100644 --- a/scripts/films.js +++ b/scripts/films.js @@ -1,7 +1,9 @@ import { api_call } from './util'; const films = document.getElementById("resultats"); +const search = document.getElementById('recherche'); +const API_SEARCH = "https://swapi.dev/api/films/?search" const API_URL = "https://swapi.dev/api/films/"; // déclare la localisation de la liste des films function remplissage(EPISODES){ @@ -27,5 +29,13 @@ function remplissage(EPISODES){ }) } +function envoiForm(event){ -api_call(API_URL, remplissage); \ No newline at end of file + event.preventDefault(); + api_call(API_SEARCH+search, remplissage) + console.log(formenvoyé); + +} + + +api_call(API_URL, remplissage); diff --git a/scripts/personnages.js b/scripts/personnages.js index 150500c..7d1a6ac 100644 --- a/scripts/personnages.js +++ b/scripts/personnages.js @@ -86,10 +86,11 @@ console.log('personnage.js loaded');
`; - + } //Pagination createPagination(previousUrl, nextUrl, PERSONNAGES, remplissage); } api_call(API_URL + "/people", remplissage); console.log('personnage.js loaded'); +