Allô à vous tous. Je ne suis pas un expert, loin de là. Voici mon tout premier essai. Il s'agit d'un formulaire qui comporte 17 questions à choix de réponses (5 choix). Une fois que toutes les réponses ont été fournies, on clique sur Calcule et un résultat apparaît (Typologie). Pour le moment tout est en javascript. Ça va bien sous Firefox mais quand je teste sous IE, l'assignation des valeurs aux variables, avec onclick des boutons, ne se fait pas. La valeur à l'initialisation (0) n'est pas modifiée sous IE. Pour vous aider à m'aider, voici le code :
S.V.P. excusez mon codage de débutant.
Note. J'ai mis en commentaire la fonction teste dans Go car IE ne change pas mes valeurs de q1 à q17.

Merci à l'avance.
-----------------------
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>Typology</title>
<script type="text/javascript">
<!--
var q1 = 0;
var q2 = 0;
var q3 = 0;
var q4 = 0;
var q5 = 0;
var q6 = 0;
var q7 = 0;
var q8 = 0;
var q9 = 0;
var q10 = 0;
var q11 = 0;
var q12 = 0;
var q13 = 0;
var q14 = 0;
var q15 = 0;
var q16 = 0;
var q17 = 0;
var nom="";
var nopass=0;
 
var radi = 30;
 
var evidence = 0;
var nonconformity =0;
var practicality = 0;
var typology = "";
 
var currentDate = new Date();
var day = currentDate.getDate();
var month = currentDate.getMonth() + 1;
var year = currentDate.getFullYear();
var hours = currentDate.getHours();
var minutes = currentDate.getMinutes();
if (minutes < 10){ minutes = "0" + minutes};
if (day < 10){ day = "0" + day};
if (month < 10){ month = "0" + month};
if (hours < 10){ hours = "0" + hours};
var maintenant = day + "/" + month + "/" + year + ":" +  hours + ":" + minutes;
 
function typo() {
var evidence = q1+q3+q9+q12+q16+q17;
var nonconformity = q2+q5+q7+q11+q13+q15;
var practicality = q4+q6+q8+q10+q14;
 
if (practicality > 14) { typology = "PRAGMATIST"; }
if (evidence > 21 && nonconformity > 18 && practicality < 15) { typology = "SEEKER"; }
if (evidence > 21 && nonconformity < 19 && practicality < 15) { typology = "SEEKER"; }
if (evidence > 17 && evidence < 22  && nonconformity < 19 && practicality < 15) { typology = "RECEPTIVE"; }
if (evidence > 17 && evidence < 22  && nonconformity > 18 && practicality < 15) { typology = "RECEPTIVE"; }
if (evidence < 18 && practicality < 15) { typology = "TRADITIONALIST"; }
 
document.getElementById('typol').value = "Evidence = " + evidence + ", Nonconformity = " + nonconformity + ", Practicality = " + practicality + ", Typology = " + typology;
}
 
 
function teste() {
	if (document.getElementById('nom').value.length == 0) { alert("You must specify a username!"); nopass=1; }
	if (q1 == 0)  { alert("Please, answer Question 1");  nopass=1; }
	if (q2 == 0)  { alert("Please, answer Question 2");  nopass=1; }
	if (q3 == 0)  { alert("Please, answer Question 3");  nopass=1; }
	if (q4 == 0)  { alert("Please, answer Question 4");  nopass=1; }
	if (q5 == 0)  { alert("Please, answer Question 5");  nopass=1; }
	if (q6 == 0)  { alert("Please, answer Question 6");  nopass=1; }
	if (q7 == 0)  { alert("Please, answer Question 7");  nopass=1; }
	if (q8 == 0)  { alert("Please, answer Question 8");  nopass=1; }
	if (q9 == 0)  { alert("Please, answer Question 9");  nopass=1; }
	if (q10 == 0) { alert("Please, answer Question 10"); nopass=1; }
	if (q11 == 0) { alert("Please, answer Question 11"); nopass=1; }
	if (q12 == 0) { alert("Please, answer Question 12"); nopass=1; }
	if (q13 == 0) { alert("Please, answer Question 13"); nopass=1; }
	if (q14 == 0) { alert("Please, answer Question 14"); nopass=1; }
	if (q15 == 0) { alert("Please, answer Question 15"); nopass=1; }
	if (q16 == 0) { alert("Please, answer Question 16"); nopass=1; }
	if (q17 == 0) { alert("Please, answer Question 17"); nopass=1; }
	return; 
}
 
 
function go() {
<!-- 	teste(); -->
	if (nopass == "0") {
		var letout="";
		var nom = document.getElementById('nom').value;
		var letout= nom + ";" + maintenant + ";" + q1 + ";" +q2 + ";" +q3 + ";" +q4 + ";" +q5 + ";" +q6 + ";" +q7 + ";" +q8 + ";" +q9 + ";" +q10 + ";" +q11 + ";" +q12 + ";" +q13 + ";" +q14 + ";" +q15 + ";" +q16 + ";" +q17;
		alert(letout);
		typo();
		document.cookie="rmavc=" +escape(letout);
	}
nopass=0;
}
 
function efface() {
q1=q2=q3=q4=q5=q6=q7=q8=q9=q10=q11=q12=q13=q14=q15=q16=q17=0;
nopass=0;
evidence = 0;
nonconformity = 0;
practicallity = 0;
typology = 0;
}
 
 
// -->
</script>
<style type="text/css">
table {
	border: 1px inset #8B8378;
	font-size: 1.1em;
}
table td {
	border: 0px solid black;
	padding: 0.2em 2ex 0.2em 2ex;
	color: black;
	text-align: center;
}
table td.left {
	text-align: left;
}
table tr.d0 td {
	background-color: #FCF6CF;
}
table tr.d1 td {
	background-color: #FEFEF2;
}
.bigButton {
  width: 1.5em; height: 1.5em;
}
</style>
</head>
 
<body>
 
<form action="" method="" id="quiz"> 
<p>Username : <input type="text" size="15" name="nom" id="nom" /></p>
<table border="0">
<tr>
<th>NO</th>
<th>QUESTION</th>
<th>&nbsp;&nbsp;STRONGLY&nbsp;&nbsp;<br/>&nbsp;&nbsp;DISAGREE&nbsp;&nbsp;</th>
<th>&nbsp;&nbsp;DISAGREE&nbsp;&nbsp;</th>
<th>&nbsp;&nbsp;NEUTRAL&nbsp;&nbsp;</th>
<th>&nbsp;&nbsp;AGREE&nbsp;&nbsp;</th>
<th>&nbsp;&nbsp;STRONGLY&nbsp;&nbsp;<br/>&nbsp;&nbsp;AGREE&nbsp;&nbsp;</th>
</tr>
<tr class = "d0">
<td>1</td>
<td class = "left">Clinical experience is more important than randomized controlled trials.</td>
<td><input class="bigButton" type="radio" name="q1" onclick="q1=5" /></td>
<td><input class="bigButton" type="radio" name="q1" onclick="q1=4" /></td>
<td><input class="bigButton" type="radio" name="q1" onclick="q1=3" /></td>
<td><input class="bigButton" type="radio" name="q1" onclick="q1=2" /></td>
<td><input class="bigButton" type="radio" name="q1" onclick="q1=1" /></td>
</tr>
<tr class = "d1">
<td>2</td>
<td class = "left">I am comfortable practicing in a different way from my colleagues.</td>
<td><input class="bigButton" type="radio" name="q2" onclick="q2=1" /></td>
<td><input class="bigButton" type="radio" name="q2" onclick="q2=2" /></td>
<td><input class="bigButton" type="radio" name="q2" onclick="q2=3" /></td>
<td><input class="bigButton" type="radio" name="q2" onclick="q2=4" /></td>
<td><input class="bigButton" type="radio" name="q2" onclick="q2=5" /></td>
</tr>
<tr class = "d0">
<td>3</td>
<td class = "left">Evidence-based practice makes a lot of sense to me.</td>
<td><input class="bigButton" type="radio" name="q3" onclick="q3=1" /></td>
<td><input class="bigButton" type="radio" name="q3" onclick="q3=2" /></td>
<td><input class="bigButton" type="radio" name="q3" onclick="q3=3" /></td>
<td><input class="bigButton" type="radio" name="q3" onclick="q3=4" /></td>
<td><input class="bigButton" type="radio" name="q3" onclick="q3=5" /></td>
</tr>
<tr class = "d1">
<td>4</td>
<td class = "left">I don't have the time to read up on every practice decision.</td>
<td><input class="bigButton" type="radio" name="q4" onclick="q4=1" /></td>
<td><input class="bigButton" type="radio" name="q4" onclick="q4=2" /></td>
<td><input class="bigButton" type="radio" name="q4" onclick="q4=3" /></td>
<td><input class="bigButton" type="radio" name="q4" onclick="q4=4" /></td>
<td><input class="bigButton" type="radio" name="q4" onclick="q4=5" /></td>
</tr>
<tr class = "d0">
<td>5</td>
<td class = "left">It is best to change the way I treat a certain problem when my local colleagues are making the same changes.</td>
<td><input class="bigButton" type="radio" name="q5" onclick="q5=5" /></td>
<td><input class="bigButton" type="radio" name="q5" onclick="q5=4" /></td>
<td><input class="bigButton" type="radio" name="q5" onclick="q5=3" /></td>
<td><input class="bigButton" type="radio" name="q5" onclick="q5=2" /></td>
<td><input class="bigButton" type="radio" name="q5" onclick="q5=1" /></td>
</tr>
<tr class = "d1">
<td>6</td>
<td class = "left">I follow practice guidelines if they are not too much hassle.</td>
<td><input class="bigButton" type="radio" name="q6" onclick="q6=1" /></td>
<td><input class="bigButton" type="radio" name="q6" onclick="q6=2" /></td>
<td><input class="bigButton" type="radio" name="q6" onclick="q6=3" /></td>
<td><input class="bigButton" type="radio" name="q6" onclick="q6=4" /></td>
<td><input class="bigButton" type="radio" name="q6" onclick="q6=5" /></td>
</tr>
<tr class = "d0">
<td>7</td>
<td class = "left">The opinions of respected authorities should guide clinical practice.</td>
<td><input class="bigButton" type="radio" name="q7" onclick="q7=5" /></td>
<td><input class="bigButton" type="radio" name="q7" onclick="q7=4" /></td>
<td><input class="bigButton" type="radio" name="q7" onclick="q7=3" /></td>
<td><input class="bigButton" type="radio" name="q7" onclick="q7=2" /></td>
<td><input class="bigButton" type="radio" name="q7" onclick="q7=1" /></td>
</tr>
<tr class = "d1">
<td>8</td>
<td class = "left">I am too busy to keep up with the recent literature.</td>
<td><input class="bigButton" type="radio" name="q8" onclick="q8=1" /></td>
<td><input class="bigButton" type="radio" name="q8" onclick="q8=2" /></td>
<td><input class="bigButton" type="radio" name="q8" onclick="q8=3" /></td>
<td><input class="bigButton" type="radio" name="q8" onclick="q8=4" /></td>
<td><input class="bigButton" type="radio" name="q8" onclick="q8=5" /></td>
</tr>
<tr class = "d0">
<td>9</td>
<td class = "left">Clinical experience is the most reliable way to know what really works.</td>
<td><input class="bigButton" type="radio" name="q9" onclick="q9=5" /></td>
<td><input class="bigButton" type="radio" name="q9" onclick="q9=4" /></td>
<td><input class="bigButton" type="radio" name="q9" onclick="q9=3" /></td>
<td><input class="bigButton" type="radio" name="q9" onclick="q9=2" /></td>
<td><input class="bigButton" type="radio" name="q9" onclick="q9=1" /></td>
</tr>
<tr>
<th>NO</th>
<th>QUESTION</th>
<th>&nbsp;&nbsp;STRONGLY&nbsp;&nbsp;<br/>&nbsp;&nbsp;DISAGREE&nbsp;&nbsp;</th>
<th>&nbsp;&nbsp;DISAGREE&nbsp;&nbsp;</th>
<th>&nbsp;&nbsp;NEUTRAL&nbsp;&nbsp;</th>
<th>&nbsp;&nbsp;AGREE&nbsp;&nbsp;</th>
<th>&nbsp;&nbsp;STRONGLY&nbsp;&nbsp;<br/>&nbsp;&nbsp;AGREE&nbsp;&nbsp;</th>
</tr>
<tr class = "d1">
<td>10</td>
<td class = "left">I am uncomfortable doing things differently from the way I was trained.</td>
<td><input class="bigButton" type="radio" name="q10" onclick="q10=1" /></td>
<td><input class="bigButton" type="radio" name="q10" onclick="q10=2" /></td>
<td><input class="bigButton" type="radio" name="q10" onclick="q10=3" /></td>
<td><input class="bigButton" type="radio" name="q10" onclick="q10=4" /></td>
<td><input class="bigButton" type="radio" name="q10" onclick="q10=5" /></td>
</tr>
<tr class = "d0">
<td>11</td>
<td class = "left">I am often critical of accepted practices.</td>
<td><input class="bigButton" type="radio" name="q11" onclick="q11=1" /></td>
<td><input class="bigButton" type="radio" name="q11" onclick="q11=2" /></td>
<td><input class="bigButton" type="radio" name="q11" onclick="q11=3" /></td>
<td><input class="bigButton" type="radio" name="q11" onclick="q11=4" /></td>
<td><input class="bigButton" type="radio" name="q11" onclick="q11=5" /></td>
</tr>
<tr class = "d1">
<td>12</td>
<td class = "left">Client care should be based where possible on randomized controlled trials, rather than the opinions of respected authorities.</td>
<td><input class="bigButton" type="radio" name="q12" onclick="q12=1" /></td>
<td><input class="bigButton" type="radio" name="q12" onclick="q12=2" /></td>
<td><input class="bigButton" type="radio" name="q12" onclick="q12=3" /></td>
<td><input class="bigButton" type="radio" name="q12" onclick="q12=4" /></td>
<td><input class="bigButton" type="radio" name="q12" onclick="q12=5" /></td>
</tr>
<tr class = "d0">
<td>13</td>
<td class = "left">My colleagues consider me to be someone who marches to my own drummer.</td>
<td><input class="bigButton" type="radio" name="q13" onclick="q13=1" /></td>
<td><input class="bigButton" type="radio" name="q13" onclick="q13=2" /></td>
<td><input class="bigButton" type="radio" name="q13" onclick="q13=3" /></td>
<td><input class="bigButton" type="radio" name="q13" onclick="q13=4" /></td>
<td><input class="bigButton" type="radio" name="q13" onclick="q13=5" /></td>
</tr>
<tr class = "d1">
<td>14</td>
<td class = "left">I follow practice guidelines as long as they don't interfere too much with the flow of clients.</td>
<td><input class="bigButton" type="radio" name="q14" onclick="q14=1" /></td>
<td><input class="bigButton" type="radio" name="q14" onclick="q14=2" /></td>
<td><input class="bigButton" type="radio" name="q14" onclick="q14=3" /></td>
<td><input class="bigButton" type="radio" name="q14" onclick="q14=4" /></td>
<td><input class="bigButton" type="radio" name="q14" onclick="q14=5" /></td>
</tr>
<tr class = "d0">
<td>15</td>
<td class = "left">It is not prudent to practice differently from my colleagues.</td>
<td><input class="bigButton" type="radio" name="q15" onclick="q15=5" /></td>
<td><input class="bigButton" type="radio" name="q15" onclick="q15=4" /></td>
<td><input class="bigButton" type="radio" name="q15" onclick="q15=3" /></td>
<td><input class="bigButton" type="radio" name="q15" onclick="q15=2" /></td>
<td><input class="bigButton" type="radio" name="q15" onclick="q15=1" /></td>
</tr>
<tr class = "d1">
<td>16</td>
<td class = "left">The best practice guidelines are based on the results of randomized controlled trials.</td>
<td><input class="bigButton" type="radio" name="q16" onclick="q16=1" /></td>
<td><input class="bigButton" type="radio" name="q16" onclick="q16=2" /></td>
<td><input class="bigButton" type="radio" name="q16" onclick="q16=3" /></td>
<td><input class="bigButton" type="radio" name="q16" onclick="q16=4" /></td>
<td><input class="bigButton" type="radio" name="q16" onclick="q16=5" /></td>
</tr>
<tr class = "d0">
<td>17</td>
<td class = "left">Evidence-based practice is not very practical in clinical reality.</td>
<td><input class="bigButton" type="radio" name="q17" onclick="q17=5" /></td>
<td><input class="bigButton" type="radio" name="q17" onclick="q17=4" /></td>
<td><input class="bigButton" type="radio" name="q17" onclick="q17=3" /></td>
<td><input class="bigButton" type="radio" name="q17" onclick="q17=2" /></td>
<td><input class="bigButton" type="radio" name="q17" onclick="q17=1" /></td>
</tr>
</table>
<p>Your result:&nbsp;<input type="text" size="85" name="typol" id="typol" /></p>
 
<p><input type="button" value="Calculate" onclick="go()" />   <input type="reset" value="Reset" onclick="efface()" /></p>
 
</form>
<form action="post" method="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" id="mail">
<input type="button" value="Click here to send us your score" onclick="" />
</form>
 
 <!--
 <p>
    <a href="http://validator.w3.org/check?uri=referer"><img
        src="http://www.w3.org/Icons/valid-xhtml10"
       alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
		    <a href="http://jigsaw.w3.org/css-validator/check/referer">
        <img style="border:0;width:88px;height:31px"
            src="http://jigsaw.w3.org/css-validator/images/vcss"
            alt="CSS Valide !" />
    </a>
 
  </p>
  // -->
</body></html>
--------------------------