Ver Mensaje Individual
  #7 (permalink)  
Antiguo 30/03/2006, 18:00
Avatar de flaviovich
flaviovich
 
Fecha de Ingreso: agosto-2005
Ubicación: Lima, Peru
Mensajes: 2.951
Antigüedad: 18 años, 9 meses
Puntos: 39
No lo he probado, pero creo que deberia funcionar.
Código:
<script>
function validar()
{
for ( var i = 70; i <= 72; i++ ) 
{
if (!validarBotonRadio(i))
//alert("1")
{
alert("no ha terminado la Evaluación" ) ;
return false;
}
}
alert("Evaluacion Completa" ); 
return true;
}
function validarBotonRadio(i)
{
//alert("2")
x = document.theForm["test_"+i+"_rp"];
//alert(document.theForm["test_"+i+"_rp"])
for ( k = 0; k < x.length; k++ ) 
//alert("test_"+i+"_rp"+k)
{
if ( x[k].checked ) 
{
alert("OIOIOI")
return true;
}
}
return false;
}
</script>
Código HTML:
<body>
<form name="theForm" action="b" method="post" onSubmit="return validar();">
<input type="radio" name="test_70_rp">
sim<br>
<input type="radio" name="test_70_rp">
nao<br>
<br>
<input type="radio" name="test_71_rp" >sim
<input type="radio" name="test_71_rp">nao<br><br>
<input type="radio" name="test_72_rp">sim
<input type="radio" name="test_72_rp">nao<br><br>
<input name="responder" type="submit" value="responder">
</form>
</body>
</html> 
__________________
No repitamos temas, usemos el Motor de busquedas
Plantea bien tu problema: Ayúdanos a ayudarte.