Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/03/2005, 15:22
Avatar de programeitor
programeitor
 
Fecha de Ingreso: febrero-2005
Mensajes: 994
Antigüedad: 19 años, 3 meses
Puntos: 9
.

<script>
function comprueba(radio){ // programeitor 2005 ,diferente accion segun radio boton
if(radio[0].checked){
if(document.sol.la.value==""){
alert('el campo LA esta vacio')
}
}
if(radio[1].checked){
if(document.sol.si.value==""){
alert('el campo SI esta vacio')
}
}
}
</script>


<form name=sol>
<input name="re" type="radio" value="fa">
LA <input name="la" type="text">
<br>
<input name="re" type="radio" value="mi">
SI <input name="si" type="text">
<p>
<input type="button" value="comprobar" onclick=comprueba(document.sol.re)>
</form>


.