Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/06/2016, 06:22
javiinet
 
Fecha de Ingreso: marzo-2012
Mensajes: 45
Antigüedad: 12 años
Puntos: 0
habilitar / deshabilitar un radio button

Hola.
No me sale esto y no sé por qué.

Quiero deshabilitar un radio button según la opción de otro, pero no me sale, es decir cómo debería ser la función javascript cambio().

Si el primer radio button está activado en la opción "SI" entonces el segundo radio button está descativado, pero si está marcado en la opción "NO" entonces el segundo radiobutton se habilita.

Gracias

Código HTML:
<form id="miform" method="post" action="">
	<li id="uno" >
		<label class="description" >Correcto?</label>
		<span>
			<input id="element_82_1" name="element_82" class="element radio" type="radio" value="1" required onchange="cambio();"/>
			<label class="choice" >SI</label>
			<input id="element_82_2" name="element_82" class="element radio" type="radio" value="2" />
			<label class="choice" >NO</label>
		</span>
	</li>
		
	<li id="dos" >
		<label class="description" for="element_57">Categoría: </label>
		<span>
			<input id="element_57_1" name="element_57" class="element radio" type="radio" value="1" disabled />
			<label class="choice" >Primera</label>
			<input id="element_57_2" name="element_57" class="element radio" type="radio" value="2" disabled />
			<label class="choice" >Segunda</label>
		</span>
	</li>
</form>