X-Git-Url: http://git.euphorik.ch/?p=pompage.git;a=blobdiff_plain;f=js%2Fyopyop.js;fp=js%2Fyopyop.js;h=3b489ee8c40628f1451907d4bfd18c8f31b707f8;hp=abd3b0f5aeb8dc105399c92a20cb828547e73ac7;hb=c8dde685f324d22c9516211979d688b3a7530558;hpb=432db4dbac80ae1025ad53db71b7ecbd0de0f053 diff --git a/js/yopyop.js b/js/yopyop.js index abd3b0f..3b489ee 100644 --- a/js/yopyop.js +++ b/js/yopyop.js @@ -1,10 +1,15 @@ +/** + * Voir : http://developer.mozilla.org/fr/docs/R%C3%A9f%C3%A9rence_du_DOM_Gecko:Introduction#DOM_et_JavaScript + * et : http://developer.mozilla.org/fr/docs/R%C3%A9f%C3%A9rence_du_DOM_Gecko:element + */ + /** * Callback appelé lorsque un film est clické. * Affiche ou cache les informations détaillés pour ce film. */ function detailFilm(id) { - var detail = document.getElementById(id) + var detail = document.getElementById("detail"+id) if (detail.style.visibility == "visible") { @@ -16,4 +21,22 @@ function detailFilm(id) detail.style.visibility = "visible" detail.style.position = "relative" } +} + +/** + * Effectue une recherche, n'affiche que les films qui contiennent le motif recherché. + */ +function doRecherche() +{ + var motif = document.getElementById("recherche").value + + var liste = document.getElementById("liste") + var lignes = liste.childNodes + for(i = 0; i < lignes.length; i++) + { + var titre = lignes[i].getElements + + + alert(tr[i].id) + } } \ No newline at end of file