Bonjour � tous,

J�ai un formulaire dans une page HTML, j�aimerais bien ajouter 3 fonctions � cette page :

Nom : form.jpg
Affichages : 172
Taille : 26,5 Ko

si besoin, voici le code HTML :

Code html : 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
<html>
<head> <title> Exemple </title> </head>
 
<style type="text/css">
table { border-collapse: collapse; }
td    { border: 1px solid black; }
</style>
 
<script language="JavaScript" type="text/JavaScript">
<!--
 
//-->
</script>
 
<body>
 
<form name="form123" action="page123.html" method="get">
 
<table border="1">
<tr> <td colspan="2" rowspan="1" width="210" bgcolor="#FFFFDD"> &nbsp;&nbsp;&nbsp; Rubrique 1 </td> </tr>
<tr> <td width="20"> <input type="checkbox" name="i01" /> </td> <td> &nbsp;choix 1 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i02" /> </td> <td> &nbsp;choix 2 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i03" /> </td> <td> &nbsp;choix 3 <br> </td> </tr>
</table>
 
<br><br>
 
<table border="1">
<tr> <td colspan="2" rowspan="1" width="210" bgcolor="#FFFFDD"> &nbsp;&nbsp;&nbsp; Rubrique 2 </td> </tr>
<tr> <td width="20"> <input type="checkbox" name="i04" /> </td> <td> &nbsp;choix 4 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i05" /> </td> <td> &nbsp;choix 5 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i06" /> </td> <td> &nbsp;choix 6 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i07" /> </td> <td> &nbsp;choix 7 <br> </td> </tr>
</table>
 
<br><br>
 
<table border="1">
<tr> <td colspan="2" rowspan="1" width="210" bgcolor="#FFFFDD"> &nbsp;&nbsp;&nbsp; Rubrique 3 </td> </tr>
<tr> <td width="20"> <input type="checkbox" name="i08" /> </td> <td> &nbsp;choix 8 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i09" /> </td> <td> &nbsp;choix 9 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i10" /> </td> <td> &nbsp;choix 10 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i11" /> </td> <td> &nbsp;choix 11 <br> </td> </tr>
<tr> <td> <input type="checkbox" name="i12" /> </td> <td> &nbsp;choix 12 <br> </td> </tr>
</table>
 
<br><br>
 
<input type="submit" value="Envoyer" /> 
<input type="reset" value="Annuler" />
 
</form>
 
</body>
</html>

Fonction 1 : on ne peut cocher au maximum que 10 choix( sur les 12) apr�s cela bloque.
Fonction 2 : indiquer � c�t� du titre de la rubrique le nombre de choix coch�s, exemple : Rubrique 1 (2 choix)
Fonction 3 : si on clique sur un titre d�une rubrique, cela affiche (ou masque) les choix en dessous du titre.

Je pense qu�un bout de code JavaScript dans la page, devrait permettre cela.

J�aimerais bien apprendre � faire cela, manipuler les valeurs d�un formulaire d�une page HTML.

Mais : je ne sais pas, par o� commencer. Si une personne peut me donner un peu d�aide.

Grandement merci, pour vos remarques et conseils.

Jean-Christophe