Tema: Urgente!!!!!
Ver Mensaje Individual
  #8 (permalink)  
Antiguo 01/02/2002, 13:14
URSU
 
Fecha de Ingreso: enero-2002
Mensajes: 55
Antigüedad: 22 años, 4 meses
Puntos: 0
Re: Urgente!!!!!

Les cuento qu agregue esta funcion pero no funciona del todo, ya que si el usuario no elije un radio si funciona y salta el cartel avisandole qeu debe elegir un radio pero....
Si elijo un radio tambien aparece el cartel, o sea que no reconoce cuando selecciono un radio.

function valida(){
var i;
for (i=0;i<document.forms[0].length;i++){
if ((document.forms[0].elements[I].name) == "id_video"){
if (document.forms[0].elements.checked){
document.forms[0].submit();
return true;
}
}
}
alert('Estimado Usuario, debe un radio');
return false;
}

los radios tienen el mismo nombre y la funcion se ejecuta aca

<form name="form1" method="post" action="vota.asp" onsubmit="return valida()" >

gracias a quien me pueda ayudar :(