[javascript]<script type="text/javascript">
function visibilite(thingId) {
var targetElement;
targetElement = document.getElementById(thingId) ;
if (targetElement.style.display == "") { targetElement.style.display = "none" ; }
else { targetElement.style.display = "" ; }
}
</script>[/javascript]
<form method="post" action="creation.php">
<fieldset>
<legend>RUBRIQUES</legend>
Cochez les éléments primaires du dossier :<br />
<input type="checkbox" name="nom1" id="nom1" onclick="javascript:visibilite('boxNom1'); return false;" />
<label for="nom1Label" id="nom1Label">Accès un niveau 1</label><br />
<input type="checkbox" name="nom2" id="nom2" onclick="javascript:visibilite('boxNom2'); return false;" />
<label for="nom2Label" id="nom2Label" >Accès au niveau 2</label><br />
</fieldset>
</form>
<div>
<strong>Cochez les éléments secondaires du dossier :</strong>
<!-- NIV1 -->
<form method="post" action="creation.php" id="boxNom1" style="display: none;">
<legend>--NIVEAU1--</legend>
<input type="checkbox" name="coucou1" id="coucou1" onclick="" />
<label for="Label1" id="Label1">NIVEAU 1</label><br />
</form>
<!-- NIV2 -->
<form method="post" action="creation.php" id="boxNom2" style="display: none;">
<legend>--NIVEAU2--</legend>
<input type="checkbox" name="coucou2" id="coucou2" onClick="" />
<label for="Label2" id="Label2">NIVEAU 2</label><br />
</form>
</div>
QUESTION : pourquoi les cases à cocher "RUBRIQUES" ne se cochent pas ? Historiquement, j'ai réussi à faire apparaître un formulaire quand une case est cliquée ! (je m'applause, 5h de recherches intensives)
@+WikiRage