Bonjour, après plusieurs jour de mise en ligne de mon site, j'ai élaboré un formulaire mais j'ai un problème avec les champs obligatoires.

pouvez-vous m'aider ?

voici le code html de ma page :

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <script>function checkrequired(which){
var pass=true
if (document.images){
for (i=0;i<which.length;i++){
var tempobj=which.elements[i]
if (tempobj.name.substring(0,8)=="required"){
if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
pass=false
break
}
}
}
}
if (!pass){
alert("Certains champs de ce formulaire sont obligatoires, merci de bien vouloir les renseigner")
return false
}
else
return true
}
  </script>
  <meta
 content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>commentaire</title>
</head>
<body
 style="background-image: url(../photos/write035.gif);">
<form
 action="http://perso0.free.fr/cgi-bin/form2mail.pl"
 onsubmit="return checkrequired(this)" method="post">
  <div style="text-align: center;"><br>
  <big style="color: rgb(255, 0, 0);"><big
 style="font-family: Footlight MT Light;"><span
 style="font-weight: bold;">POSTER
UN COMMENTAIRE</span></big></big><br>
  <br>
  <div
 style="text-align: left; font-style: italic;">
  <div style="text-align: center;"><img
 style="width: 25px; height: 23px;" alt="attention !"
 src="../photos/constructions-panneaux15.gif">&nbsp;&nbsp;&nbsp;
Cet
espace est uniquement
r&eacute;serv&eacute; aux commentaires consernant les montages
photos,
pour faire un commentaire sur l'ensemble du site, <a
 href="http://livredor.hiwit.org/index.php?idsite=12256&amp;zone=e">signez
le livre d'or</a>.<br>
  </div>
  <small><br>
  <span style="color: rgb(255, 0, 0);">*
  <span style="font-family: Harrington;">Champs
obligatoires</span><br
 style="font-family: Harrington;">
  <br style="font-family: Harrington;">
  </span></small>
  <div
 style="text-align: center; color: rgb(51, 0, 153); font-family: Harrington;"><small>Veillez
&agrave; ce que vos messages soit lisibles,
compr&eacute;hensibles et sans fautes d'ortographes volontaires
(type
texto). Merci.</small></div>
  </div>
  <br>
  </div>
  <fieldset> <legend
 style="color: rgb(255, 204, 0); font-weight: bold; font-family: Kristen ITC;">&nbsp;Vos
coordonn&eacute;es&nbsp;</legend>
<!-- Titre du fieldset --><span
 style="color: rgb(255, 0, 0);"><br>
* </span><small
 style="color: rgb(0, 0, 0);"><span
 style="font-family: Lucida Sans;">Votre nom :</span></small>
  <input
 style="font-family: Courier; color: rgb(102, 51, 255);"
 name="nom"><br>
  <br>
  <span style="color: rgb(255, 0, 0);">*
  </span><small
 style="font-family: Lucida Sans;">Votre adresse
E-mail : </small><input
 style="color: rgb(102, 51, 255); font-family: Courier;"
 name="e-mail"><br>
  <br>
  <small><label
 style="font-family: Lucida Sans;">Site Web perso :<br>
  <textarea style="color: rgb(102, 51, 255);"
 cols="50" rows="1" name="url perso"></textarea></label></small></fieldset>
  <p> </p>
  <fieldset><legend><span
 style="font-family: Kristen ITC; color: rgb(255, 204, 0); font-weight: bold;">&nbsp;Votre
commentaire</span> &nbsp;</legend>
<!-- Titre du fieldset -->
  <p></p>
  <small><label
 style="font-family: Lucida Sans;">Titre
du commentaire :<br>
  <input
 style="font-family: Courier; color: rgb(102, 51, 255);"
 maxlength="100" size="50" name="titre">
  </label></small><br>
  <label> </label><br>
  <span style="color: rgb(255, 0, 0);">*
  </span><small><span
 style="font-family: Lucida Sans;">Commentaire :</span></small>
  <br>
  <textarea
 style="font-family: Courier; color: rgb(102, 51, 255);"
 name="commentaire" cols="50" rows="10"
 commentaire=""></textarea></fieldset>
  <br>
  <div style="text-align: center;"><input
name="submit" value=" &nbsp; &nbsp; Envoyer &nbsp; &nbsp; " type="submit">&nbsp;&nbsp;&nbsp;<input
 value="Recommencer" name="reset" type="reset">
  </div>
  <p
 style="text-align: center; font-family: Perpetua; color: rgb(204, 153, 51);"><big><span
 style="font-weight: bold; text-decoration: underline;">Note
:</span> Votre commentaire va
&ecirc;tre envoy&eacute; &agrave;
l'administrateur du site. Il sera mis en ligne dans les prochains
jours.</big></p>
  <p
 style="text-align: center; font-family: Perpetua; color: rgb(204, 153, 51);"><big>Toutefois,
si l'administrateur exige qu'il ne doit pas
&ecirc;tre difus&eacute;, vous&nbsp;serez
inform&eacute;s par
mail des diverses raisons de son refus.</big></p>
  <div style="text-align: center;"><big
 style="font-family: Gourmand;"><a
 href="liste_commentairespage%20type.html">Lire les
Commentaires</a></big></div>
</form>
</body>
</html>

lorsque j'ai fait un test je me suis apperçue que meme les champs obligatoires vides, le message été envoyé.

merci pour votre aide.

élodie