bonjour a tous,
j'ai un menu deroulant avec 6 possibilit�s (CDI, CDD, INTERIM, STAGE, PROFESSIONNALISATION, APPRENTISSAGE)
quand je choisi les deux premiers, j'arrive a afficher les modalit�s mais quand je choisi les 4 derniers j'aimerais afficher un champs text (genre --> Dur�e du contrat : _________)
je n'arrive pas a afficher ce champs text, voici le code du menu d�roulant :
dans le head :
dans le body :
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 <script type='text/javascript'> function showChoice(lechoix){ var affiche =""; switch(lechoix){ case ('a') : affiche="123"; break; case ('b') : affiche="24"; break; case ('c') : affiche=""; break; case ('d') : affiche=""; break; case ('e') : affiche=""; break; case ('f') : affiche=""; break; } var listesouschoix=document.getElementsByName('souschoix'); for(i=0;i<listesouschoix.length;i++){ var here =(affiche.indexOf(i)>-1)?'':'none'; listesouschoix[i].style.display= here; document.getElementById("label"+(i*1+1)).style.display=here; } } </script>
est ce que quelqu'un pourrait-il m'aider
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 <?php echo " <select name='choix' id='choix' onchange='showChoice(this.value)'> <option selected>-----------Sélectionnez-----------</option> <option value='a'>CDI</option> <option value='b'>CDD</option> <option value='c'>INTERIM</option> <option value='d'>STAGE</option> <option value='e'>PROFESSIONNALISATION</option> <option value='f'>APPRENTISSAGE</option> </select><br> <input type='radio' name='souschoix' id='souschoix1' style='display:none;' value='machin chose 1' /><label for='souschoix1' id='label1' style='display:none;' >sous choix 1</label> <input type='radio' name='souschoix' id='souschoix2' style='display:none;' value='machin chose 2' /><label for='souschoix2' id='label2' style='display:none;' >Remplacement</label> <input type='radio' name='souschoix' id='souschoix3' style='display:none;' value='machin chose 3' /><label for='souschoix3' id='label3' style='display:none;' >Création</label> <input type='radio' name='souschoix' id='souschoix4' style='display:none;' value='machin chose 4' /><label for='souschoix4' id='label4' style='display:none;' >Transformation d'un CDD</label> <input type='radio' name='souschoix' id='souschoix5' style='display:none;' value='machin chose 5' /><label for='souschoix5' id='label5' style='display:none;' >Renouvellement</label><br> " ; ?>
merci d'avance
salutations.
Partager