Salut à tous,

j'ai un petit problème, je souhaite lorsque je clique sur une des images du div "C1" que celui-ci modifie le texte de "C3,C5 et C10, AISI QUE LA COLONE 2 DE MON TABLEAU" mais apparament il y a un problème avec le code, car seul "C3" se modifie. Quelqu'un aurait-il l'amabilité de me corriger l'erreur de code afin que je puisse comprendre et effectuer des opérations similaire à d'autres div.

Merci
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
 
<script language="javascript">  
 
function affiche_text(id) {   
 
 
 
    if (id == "C1"){  
 
        var text1 = "<strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>A</span></strong><br /><strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>A</span></strong><br /><br /><strong style='color: rgb(68, 68, 68);'><span style='font-size: 12px;'>A</span></strong>";  
 
        var text2 = "<strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>C</span></strong>";
 
		var text3 = "<strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>E</span></strong>";
 
		var text4 = "<strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>Y</span></strong>";  
 
    }  
 
 
 
    else{  
 
        var text1 = "<strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>B</span></strong><br /><strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>B</span></strong><br /><br /><strong style='color: rgb(68, 68, 68);'><span style='font-size: 12px;'>B</span></strong>";  
 
        var text2 = "<strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>D</span></strong>";
 
		var text3 = "<strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>F</span></strong>";
 
		var text4 = "<strong style='color: rgb(68, 68, 68);'><span style='font-size: 14px;'>Z</span></strong>";  
 
    }  
 
    document.getElementById("C3").innerHTML = text1;  
 
    document.getElementById("???").innerHTML = text2;
 
	document.getElementById("C5").innerHTML = text3;
 
	document.getElementById("C10").innerHTML = text4;  
 
}  
 
</script>
 
</head>
 
 
 
<body>
 
<div id="CP">
 
  <div id="C1">
 
  <img src="http://data.imagup.com/2/1105182592.png" onclick="affiche_text('C1');" width="41" height="12" />
 
  <img src="http://data.imagup.com/3/1105182610.png" onclick="affiche_text('C5');" width="42" height="12" /></div>
 
  <div id="E1"></div>
 
  <div id="C3"><strong style="color: rgb(68, 68, 68);"><span
 
  style="font-size: 14px;">A</span></strong><br />
 
  <strong style="color: rgb(68, 68, 68);"><span style="font-size: 14px;">A</span></strong><br />
 
  <br />
 
  <font color="#9900cc"><strong><span style="font-size: 12px;">A</span></strong></font></div>
 
  <div id="E2"></div>
 
  <div id="C4"><table width="780" border="0" cellspacing="0" cellpadding="0">
 
  <tr>
 
<td width="100">&nbsp;</td>
 
<td style="font-family: Century Gothic; font-size: 11px;"
 
width="290">C</td>
 
<td width="0">&nbsp;</td>
 
<td style="text-align: center;" width="380"><br />
 
</td>
 
</tr>
 
</table>
 
</div>
 
  <div id="E3"></div>
 
  <div id="C5"><strong>E</strong></div>
 
  <div id="C10"><strong>Y</strong></div>
 
 </div>
 
</body>
 
</html>