Bonjour,

suivant ce que je selectionne dans une liste déroulante j'affiche ou non certains champs d'un formulaire. Cela passe nikel sous Firefox mais pas sous IE

voici le code html
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
 
 
 <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0 valign=top>
    <tr>
    <td width=200><div class='label'>".$oTierType->label."</td>
    <td>".$oTierType->GetHtml()."</div></td></tr>        
    <tr><td><div id='label_structure' >".$oTierParent->label."</div></td>
     <td><div id='ctrl_structure'>".$oTierParent->GetHtml()."&nbsp;&nbsp;</div>
</td></tr>
     <tr><td id='label_civilite'><div class='label' >".$oTierCivilite->label."</div></td>
     <td id='ctrl_civilite'>".$oTierCivilite->GetHtml()."</div></td></tr>
      <tr><td><div class='label'>".$oTierNom->label."</td>
      <td>".$oTierNom->GetHtml()."</div></td></tr>
      <tr><td><div class='label'>".$oTierMail->label."</td>
     <td>".$oTierMail->GetHtml()."</div></td></tr>
     <tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr>
</TABLE></div>";
et voici le javascript
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
28
29
30
31
32
33
34
35
36
37
 
function onChangeTypeTier (oCtrlSelect)
{
	var val_type;
	val_type = oCtrlSelect.options[oCtrlSelect.selectedIndex].value;
 
	  if (document.getElementById) {
 
	 label_structure = document.getElementById("label_structure");
	 ctrl_structure = document.getElementById("ctrl_structure");
	 label_civilite = document.getElementById("label_civilite");
 	 ctrl_civilite = document.getElementById("ctrl_civilite");
 
	 switch (val_type) {
	 	case '0':		
 
			label_civilite.style.visibility = 'hidden';
			ctrl_civilite.style.visibility = 'hidden';
 
			ctrl_structure.style.visibility = 'hidden';
			label_structure.style.visibility = 'hidden'; 
 
		break;
 
  		case '1':
			label_civilite.style.visibility = 'visible';
			ctrl_civilite.style.visibility = 'visible';
 
			ctrl_structure.style.visibility = 'visible';
			label_structure.style.visibility = 'visible';
 
 
		break;
 		}
		}
 
}
Quelqu'un peut-il m'expliquer pourquoi cela ne passe pas sous IE?

merci

à+