|
Liste dynamique
Aller je me répond a moi même pour remercier l’ensemble des personne qui m’ont aider et qui font vivre ce forum.
Ce code représente donc un formulaire, dans lequel il y a trois listes.
La 1er pour les rubriques principal (nommé Domaines)
La 2eme pour les sous-rubriques (nommé matieres)
La 3eme pour les sous-sous rubriques (nommé sous-matieres)
Quand on selectionne un élément de la 1er, la deuxieme se met a jour en fonction, et ainsi de suite.
Encore merci pour rien et vivement que ce forum bouge pour aider l’ensemble des utilisateur de cet outil qui est ma foi, vraiment pas mal !
<FORM id="tri" action="#" method="get" name="tri">
<SELECT name="choix_domaine" onChange="if (options[selectedIndex].value) {location = options[selectedIndex].value;}">
<OPTION VALUE="">Domaines</OPTION>
<BOUCLE_choixDomaine(RUBRIQUES){racine}{par titre}>
[<OPTION VALUE="[(#SELF|parametre_url{'choixDomaine',#ID_RUBRIQUE}|parametre_url{'var_mode','calcul'})]">(#TITRE)</OPTION>]
</BOUCLE_choixDomaine>
</SELECT>
</BR></BR>
<SELECT NAME="choix_matiere" onChange="if (options[selectedIndex].value) {location = options[selectedIndex].value;}">
<OPTION VALUE="">Matières</OPTION>
<BOUCLE_selectDomaine(RUBRIQUES) {id_rubrique=#ENV{choixDomaine}}>
<BOUCLE_choixMatiere(RUBRIQUES) {id_parent}{par titre}>
[<OPTION VALUE="[(#SELF|parametre_url{'choixMatiere',#ID_RUBRIQUE}|parametre_url{'var_mode','calcul'})]">(#TITRE)</OPTION>]
</BOUCLE_choixMatiere>
</BOUCLE_selectDomaine>
</SELECT>
</BR></BR>
<SELECT NAME="id_matiere">
<OPTION VALUE="">Sous-matières</OPTION>
<BOUCLE_selectDomaine2(RUBRIQUES) {id_rubrique=#ENV{choixDomaine}}>
<BOUCLE_selectMatiere(RUBRIQUES) {id_rubrique=#ENV{choixMatiere}}>
<BOUCLE_choixSousMatiere(RUBRIQUES) {id_parent}{par titre}>
<OPTION VALUE="">#TITRE</OPTION>
</BOUCLE_choixSousMatiere>
</BOUCLE_selectMatiere>
</BOUCLE_selectDomaine2>
</SELECT>
</BR></BR>
<INPUT TYPE="submit" NAME="Valider" VALUE="Afficher les articles">
</FORM>
|