Ver Mensaje Individual
  #5 (permalink)  
Antiguo 14/06/2011, 13:49
juan24_14
 
Fecha de Ingreso: junio-2011
Ubicación: venezuela
Mensajes: 25
Antigüedad: 12 años, 11 meses
Puntos: 0
Respuesta: problema con validaciones

<form id="form1" name="form1" method="post" action="">
<table width="804" height="60" border="1" align="center" cellpadding="0" cellspacing="3">
<tr>
<th colspan="2" scope="col"><blockquote>
<p><span class="style5">Condición Medica</span></p>
</blockquote></th>
</tr>
<tr>
<td width="162"><div align="right" class="style9">Sr(a)</div></td>
<td width="636"><div align="center"><?php echo $noma." ".$apea; ?></div></td>
</tr>
</table>
<table width="804" border="1" align="center" cellpadding="0" cellspacing="3">
<tr>
<th width="164" scope="col"><div align="right" class="style8">Se vale por si Mismo(a)</div></th>
<th width="331" scope="col"><label>
<input type="radio" name="valencia" value="Si" id="valencia_0" />
Si</label>
<br />
<label></label></th>
<th width="301" scope="col"><label>
<input type="radio" name="valencia" value="No" id="valencia_1" />
No</label></th>
</tr>
</table>
<table width="804" height="24" border="1" align="center" cellpadding="0" cellspacing="3">
<tr>
<th width="162" scope="col"><div align="right" class="style8">Condición Motora</div></th>
<th width="313" scope="col"><div align="justify"> Apoyo Ortopedico:
<label></label>
<input type="radio" name="apoyo" value="Si" id="apoyo_0" onclick="makeEnable()" />
<label>Si</label>
<label>
<input type="radio" name="apoyo" value="No" id="apoyo_1" onclick="makeDisable()" />
No</label>
</div></th>
<th width="309" scope="col"><div align="left">
<label>
<select name="tipo" size="1" disabled="disabled" id="tipo">
<option value="Seleccionar...">Seleccionar...</option>
<option value="Baston">Baston</option>
<option value="Andadera">Andadera</option>
<option value="Silla de Rueda Clinica">Silla de Rueda Clinica</option>
<option value="Silla de Rueda Ortopedica">Silla de Rueda Ortopedica</option>
<option value="Muletas Auxiliares">Muletas Auxiliares</option>
<option value="Muletas Canadiense">Muletas Canadiense</option>
</select>
</label>
</div></th>
</tr>
</table>
<table width="804" border="1" align="center" cellpadding="0" cellspacing="3">
<tr>
<th width="165" scope="col"><div align="right" class="style8">Cardiovascular</div></th>
<th width="226" scope="col"><label>
<input type="radio" name="cardio" value="Infarto Miocardio" id="cardio_0" onclick="comprobar(this)" />
Infarto Miocardio</label></th>
<th width="198" scope="col"><label>
<input type="radio" name="cardio" value="Hipertension Arterial" id="cardio_1" onclick="comprobar(this)" />
Hipertensión Arterial</label></th>
<th width="205" scope="col"><label>
<input type="radio" name="cardio" value="Ac. Cerebro Vascular" id="cardio_2" onclick="comprobar(this)" />
Ac. Cerebro Vascular</label></th>
</tr>
</table>
<table width="804" border="1" align="center" cellpadding="0" cellspacing="3">
<tr>
<th width="165" scope="col"><div align="right" class="style8">Cognitiva</div></th>
<th width="183" scope="col"><label>
<input type="radio" name="cognitiva" value="Compromiso Bajo" id="cognitiva_0" onclick="makeEnable2 ()" />
Compromiso Bajo</label></th>
<th width="167" scope="col"><p>
<label>
<input type="radio" name="cognitiva" value="Compromiso Alto" id="cognitiva_1" onclick="makeEnable2 ()" />
Compromiso Alto</label>
</p>
<label></label></th>
<th width="279" scope="col"><div align="justify">Especifique:
<label></label>
<label>
<input name="anny" type="text" disabled="disabled" id="anny" value="<?php echo $anny; ?>" />
</label>
</div></th>
</tr>
</table>
<table width="804" border="1" align="center" cellpadding="0" cellspacing="3">
<tr>
<th width="160" scope="col"><div align="right" class="style8">Visual</div></th>
<th width="166" scope="col"><label>
<input type="radio" name="discapacidad" value="Discapacidad Total" id="discapacidad_0" onclick="makeEnable3 ()"/>
Discapacidad Total</label></th>
<th width="147" scope="col"><div align="justify">Bastón:
<label>
<input name="baston" type="radio" disabled="disabled" id="baston_0" value="Si" />
Si</label>
<label>
<input name="baston" type="radio" disabled="disabled" id="baston_1" value="No" />
No</label>
</div></th>
<th width="164" scope="col"><div align="justify">
<label>
<input type="radio" name="discapacidad" value="Discapacidad Parcial" id="discapacidad_1" onclick="makeEnable4 ()" />
Discapacidad Parcial</label>
</div></th>
<th width="137" scope="col"><div align="justify">Lentes
<label>
<input name="lentes" type="radio" disabled="disabled" id="lentes_0" value="Si" />
Si</label>
<label>
<input name="lentes" type="radio" disabled="disabled" id="lentes_1" value="No" />
No</label>
</div></th>
</tr>
</table>
<table width="804" border="1" align="center" cellpadding="0" cellspacing="3">
<tr>
<th width="164" scope="col"><div align="right" class="style8">Auditiva</div></th>
<th width="161" scope="col"><div align="justify">
<label>
<input type="radio" name="auditiva" value="Discapacidad Total" id="auditiva_0" onclick="makeEnable5()" />
Discapacidad Total</label>
</div></th>
<th width="181" scope="col"><div align="justify">
<label>
<input type="radio" name="auditiva" value="Discapacidad Parcial" id="auditiva_1" onclick="makeEnable5()" />
Discapacidad Parcial</label>
</div></th>
<th width="288" scope="col"><div align="justify">Protesis:
<label>
<input name="protesis" type="radio" disabled="disabled" id="protesis_0" value="Si" />
Si</label>
<label>
<input name="protesis" type="radio" disabled="disabled" id="protesis_1" value="No" />
No</label>
</div></th>

<script type= "text/javascript" >
//validacion de Radio Button
var aux= new Array();

function comprobar(rad) {
var group= rad.name;
var val= rad.value;
if(!aux[group]) {
aux[group]= val;
} else {
if (aux[group]==val) {
aux[group]=false;
rad.checked=false;
} else {
aux[group]=val;
}
}
}
function makeDisable (){
var x=document.getElementById ( "tipo" )
x.disabled= true
}
function makeEnable (){
var x=document.getElementById ( "tipo" )
x.disabled= false
}
function makeEnable2 (){
var y=document.getElementById ( "anny" )
y.disabled= false
}
function makeEnable3 (){
var a=document.getElementById ( "baston_0" )
a.disabled= false
var b=document.getElementById ( "baston_1" )
b.disabled= false
var c=document.getElementById ( "lentes_0" )
c.disabled= true
c.checked=false
var d=document.getElementById ( "lentes_1" )
d.disabled= true
d.checked=false

}
function makeEnable4 (){
var a=document.getElementById ( "baston_0" )
a.disabled= true
a.checked=false
var b=document.getElementById ( "baston_1" )
b.disabled= true
b.checked=false
var c=document.getElementById ( "lentes_0" )
c.disabled= false
var d=document.getElementById ( "lentes_1" )
d.disabled= false

}
function makeEnable5 (){
var a=document.getElementById ( "protesis_0" )
a.disabled= false
var b=document.getElementById ( "protesis_1" )
b.disabled= false

}


</script>