Bonjour,
j'ai eu un code sur le net qui me permet de cacher ou faire apparaitre un champs texte mais il se trouve que le code se comporte pas comme je veux.
je voudrais que le champ reste caché et que c'est quand je coche le bouton qu'il apparait . le code que j'ai fait le contraire .
voici mon code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
<script language="Javascript">
// ==================
// Activations - Désactivations
// ==================
function GereControle(Controleur, Controle, Masquer) {
var objControleur = document.getElementById(Controleur);
var objControle = document.getElementById(Controle);
if (Masquer=='1')
objControle.style.visibility=(objControleur.checked==true)?'visible':'hidden';
else
objControle.disabled=(objControleur.checked==true)?false:true;
return true;
}
</script>
</head>
<body>
<table width="568" border="0">
<tr>
<td width="65">Assure</td>
<td width="70"><input type="radio" id="radio_10" name="radios_0" onClick="GereControle('radio_10', 'liste_10', '1');" CHECKED> <label for="radio_10">Oui</label></td>
<td width="419"><input type="radio" id="radio_20" name="radios_0" onClick="GereControle('radio_10', 'liste_10', '1');"> <label for="radio_20">Non</label></td>
</tr>
</table>
<div id="liste_10">
<div style="position: absolute; top: 100px; left: 14px; height: 347px;">
<table width="1003" height="203" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<td colspan="4"></td>
</tr>
<tr>
<td width="210"><span class="Style13">Nom assurance</span></td>
<td colspan="3"><input name="nom_assurance" type="text" style='background-color: #99CC00; color: #FFFFFF; font-weight: bold; border-width: 1px; font-size:12pt'/></td>
</tr>
<tr>
<td><span class="Style13">Nom Société</span></td>
<td colspan="3"><input name="nom_societe" type="text" size="50" style='background-color: #99CC00; color: #FFFFFF; font-weight: bold; border-width: 1px; font-size:12pt'/></td>
</tr>
<tr>
<td><span class="Style13">Nom de l'assuré</span></td>
<td colspan="3"><input name="nom_assure" type="text" style='background-color: #99CC00; color: #FFFFFF; font-weight: bold; border-width: 1px; font-size:12pt'/></td>
</tr>
<tr>
<td><span class="Style13">Numéro de carte d'assurance:</span></td>
<td colspan="3"><input name="num_carte" type="text" style='background-color: #99CC00; color: #FFFFFF; font-weight: bold; border-width: 1px; font-size:12pt'/></td>
</tr>
<tr>
<td><span class="Style13">Plafond</span></td>
<td width="168"><span class="Style7">
<input name="plafond" type="text" style='background-color: #99CC00; color: #FFFFFF; font-weight: bold; border-width: 1px; font-size:12pt'/>
</span></td>
<td width="89"> </td>
<td width="382"> </td>
</tr>
<tr>
<td>Taux de couverture:</td>
<td colspan="3"><span class="Style7">
<select name="taux" style='background-color: #99CC00; color: #FFFFFF; font-weight: bold; border-width: 1px; font-size:12pt'>
<option>0</option>
<option>1</option>
<option>2</option>
</select>
%</span></td>
</tr>
<tr>
<td><span class="Style13">Tiers payant: </span></td>
<td colspan="2"><input name="tiers" type="text" style='background-color: #99CC00; color: #FFFFFF; font-weight: bold; border-width: 1px; font-size:12pt'/></td>
<td> </td>
</tr>
</table>
</div></div>
</body>
</html>
Afficher la suite