Desactiver zone de texte

Fermé
ccmnina Messages postés 5 Date d'inscription vendredi 23 janvier 2009 Statut Membre Dernière intervention 10 février 2009 - 10 févr. 2009 à 20:13
ccmnina Messages postés 5 Date d'inscription vendredi 23 janvier 2009 Statut Membre Dernière intervention 10 février 2009 - 10 févr. 2009 à 20:24
Bonjour,
j'ai une page contenant des zones de textes et des bouttons radio et j'ai ecris un code pour desactiver une zone de texte quand on click sur le boutton radio.le code apparait correcte mai ca marche pas .
merci
A voir également:

2 réponses

Ricky38 Messages postés 4349 Date d'inscription samedi 15 mars 2008 Statut Contributeur Dernière intervention 2 novembre 2013 1 459
10 févr. 2009 à 20:18
salut,

ce serait bien de voir ton code pour voir ou est l'erreur

Merci
0
ccmnina Messages postés 5 Date d'inscription vendredi 23 janvier 2009 Statut Membre Dernière intervention 10 février 2009
10 févr. 2009 à 20:24
<!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=iso-8859-1" />
<link href="slider.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="slider.js"></script>

<title>Control & connection</title>
<style type="text/css">
<!--
body {
background-image: url(../../images/-media-reel-divers-divers-114.jpg);
background-repeat: no-repeat;
background-color: #D2E1E8;
}
#Layer1 {
position:absolute;
width:307px;
height:307px;
z-index:1;
left: 145px;
top: 71px;
visibility: visible;
}
#Layer2 {
position:absolute;
width:108px;
height:48px;
z-index:2;
left: 163px;
top: 7px;
visibility: visible;
}
#Layer3 {
position:absolute;
width:174px;
height:28px;
z-index:2;
left: 84px;
top: -3px;
background-color: #FFFFFF;
visibility: visible;
}
#Layer4 {
position:absolute;
width:237px;
height:34px;
z-index:2;
left: 33px;
top: 76px;
visibility: visible;
}
#Layer5 {
position:absolute;
width:245px;
height:27px;
z-index:2;
left: 179px;
top: 181px;
visibility: visible;
}
#Layer6 {
position:absolute;
width:184px;
height:27px;
z-index:3;
left: 181px;
top: 213px;
visibility: visible;
}
#slider {
position:absolute;
width:240px;
height:127px;
z-index:4;
left: 177px;
top: 243px;
visibility: visible;
}
#Layer1 #Layer3 div {
font-family: Arial;
font-size: 18px;
font-style: normal;
color: #000000;
}
.Style3 {
font-size: 14px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.Style4 {
font-size: 16;
font-weight: bold;
}
#Layer8 {
position:absolute;
width:308px;
height:308px;
z-index:5;
left: 583px;
top: 73px;
background-color: #FFFFFF;
}
#Layer9 {
position:absolute;
width:167px;
height:63px;
z-index:6;
left: 600px;
top: 101px;
}
#Layer10 {
position:absolute;
width:129px;
height:48px;
z-index:7;
left: 600px;
top: 190px;
}
#Layer11 {
position:absolute;
width:137px;
height:38px;
z-index:8;
left: 603px;
top: 285px;
}
#Layer12 {
position:absolute;
width:256px;
height:22px;
z-index:9;
left: 173px;
top: 33px;
background-color: #DBE5E2;
}
#Layer13 {
position:absolute;
width:193px;
height:22px;
z-index:10;
left: 609px;
top: 33px;
background-color: #DBE5E2;
}
#Layer14 {
position:absolute;
width:90px;
height:28px;
z-index:11;
left: 33px;
top: 26px;
background-color: #FFFFFF;
}
.Style8 {color: #000000; font-size: 14px; font-family: Arial, Helvetica, sans-serif;}
#apDiv1 {
position:absolute;
left:807px;
top:203px;
width:41px;
height:36px;
z-index:11;
}
#apDiv2 {
position:absolute;
left:774px;
top:293px;
width:103px;
height:51px;
z-index:12;
}
-->
</style>
<!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">
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
<script type="text/javascript">
function changeColor(arg,calc){
elem = document.getElementById(calc);
if(arg==1)
elem.style.backgroundImage = 'url(../../images/Capture02.jpg)';
else
elem.style.backgroundImage = 'url(../../images/Capture01.jpg)';
}
</script>
<script type="text/javascript">
function changeimg(arg,calc){
elem = document.getElementById(calc);
if(arg==1)
elem.style.backgroundImage = 'url(../../images/motor2.GIF)';
else
elem.style.backgroundImage = 'url(../../images/motor1.GIF)';
}
</script>

<style type="text/css">
<!--
#rec {
position:absolute;
width:41px;
height:36px;
z-index:1;
left: 224px;
top: 45px;
}
.Style14 {
font-size: small;
font-style: italic;
color: #0000FF;
}
.Style16 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 18px;
}
-->
</style>
</head>

<body>
<div id="Layer1">
<table width="311" height="311" border="3" bordercolor="#FFFFFF" bgcolor="#000000">
<tr>
<td width="297" height="301" bordercolor="#333333" bgcolor="#FFFFFF"><div id="Layer2">
<label></label>
<form id="form1" name="form1" method="post" action="">
<p>
<label>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio" onclick="textfield2.disabled =false;" />
Control</label>
<br />
<label>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio" onclick="textfield2.disabled =true;" />
Instruction</label>
<br />
</p>
</form>
</div>
<label>
<div id="Layer4">
<label></label>
<form id="form2" name="form2" method="post" action="">
<label><span class="Style3">Emission:   </span>
<script language="javascript" type="text/javascript" src="bull.js"> </script>
<input type="text" name="textfield" onmouseover="montre('Emission')"/>
</label>
</form>
</div>
<div class="Style8" id="Layer14"><strong>Mode:</strong></div> </td>
</tr>
</table>
</div>
<div id="Layer5">
<form id="form3" name="form3" method="post" action="">
<label><span class="Style3">Reception </span><strong>: </strong>
<input type="text" name="textfield2" />
</label>
</form>
</div>
<div id="Layer6">
<form id="form4" name="form4" method="post" action="">
<span class="Style15">
<label>
<strong>Speed(Hz):</strong></span><span class="Style4"> </span>
<div id="Layer3">
<div class="Style8">
<div id="pos1"></div>
</div>
</div>
</label>
</form>
</div>
<div id="slider">
<div id="slideContainer1">
<div id="slideHandle1">
<script type="text/javascript">

window.addEvent('domready', function(){
var slider1 = new Slider('slideContainer1', 'slideHandle1',{onComplete: function(val){$('pos1').setHTML(val);}});
var slider2 = new Slider('slideContainer2', 'slideHandle2', {
onTick: function(pos){
this.knob.effect(this.p, {duration: 200, transition: Fx.Transitions.quadOut}).start(pos);
},
onComplete: function(val){
$('pos2').setHTML(val);
},
steps: 5
});
});
</script>
</div></div>
<p><span class="Style14">Faites glisser la barre pour changer la vitesse: </span> 
<p>             
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload2.macromedia.com/get/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="105" height="21">
<param name="movie" value="button1.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<embed src="button1.swf" quality="high" pluginspage="https://get.adobe.com/flashplayer/" type="application/x-shockwave-flash" width="105" height="21" bgcolor="#FFFFFF"></embed>
</object>
<p>   </div>
<div id="Layer8">
<table width="311" height="311" border="3" bordercolor="#FFFFFF" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td width="369" bgcolor="#FFFFFF"><div id="rec"></div></td>
</tr>
</table>
</div>
<div id="Layer9">

<p>
<label>
<input name="couleur" type="radio" value="0" onClick="changeColor(0,'rec');" />
Power ON</label>
<br />
<label>
<input name="couleur"type="radio" value="1" onClick="changeColor(1,'rec');" />
Power OFF</label>
<br />
</p>
</div>
<div id="apDiv1"></div>
<div id="Layer10">
<form id="form6" name="form6" method="post" action="">
<p>
<label>
<input type="radio" name="Groupe de boutons radio3" value="bouton radio" onClick="changeColor(0,'apDiv1');" />
Connect</label>
<br />
<label>
<input type="radio" name="Groupe de boutons radio3" value="bouton radio" onClick="changeColor(1,'apDiv1');"/>
Disconnect</label>
<br />
</p>
</form>
</div>
<div id="apDiv2"></div>
<div id="Layer11">
<form id="form7" name="form7" method="post" action="">
<p>
<label>
<input type="radio" name="Groupe de boutons radio4" value="bouton radio" onClick="changeimg(0,'apDiv2');"/>
Motor only</label>
<br />
<label>
<input type="radio" name="Groupe de boutons radio4" value="bouton radio" onClick="changeimg(1,'apDiv2');"/>
Loading Motor</label>
<br />
</p>
</form>
</div>
<div id="Layer12"><img src="../../images/SamSami.jpg" alt="ff" width="256" height="29" /></div>
<div id="Layer13"><img src="../../images/Samsami2.jpg" alt="flfol" width="256" height="29" /></div>

</body>
</html>

merci
0