Ver Mensaje Individual
  #5 (permalink)  
Antiguo 09/05/2006, 02:50
javihb
 
Fecha de Ingreso: octubre-2004
Mensajes: 230
Antigüedad: 20 años, 6 meses
Puntos: 0
Bueno ....pues conseguí solucionar lo de los radio buttons dependientes.......hay os pongo el código
Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
function valbutton(thisform) {
// place any other field validations that you require here
// validate myradiobuttons
myOption = -1;
for (i=thisform.gr1.length-1; i > -1; i--) {
if (thisform.gr1[i].checked) {
myOption = i;
}
}
if (myOption == -1) {
alert("Debes seleccionar alguna opción");
return false;
}
// place any other field validations that you require here
thisform.submit(); // this line submits the form after validation
}
function Disab (val) {
if(val=="1") 
{
form1.gr11[0].disabled=false;
form1.gr11[1].disabled=false;
form1.gr11[2].disabled=false;
form1.gr12[0].disabled=true;form1.gr12[0].checked=false;
form1.gr12[1].disabled=true;form1.gr12[1].checked=false;
form1.gr12[2].disabled=true;form1.gr12[2].checked=false
}
if(val=="2") 
{
form1.gr11[0].disabled=true;form1.gr11[0].checked=false;
form1.gr11[1].disabled=true;form1.gr11[1].checked=false;
form1.gr11[2].disabled=true;form1.gr11[2].checked=false;
form1.gr12[0].disabled=false;
form1.gr12[1].disabled=false;
form1.gr12[2].disabled=false}
}
//-->
</script>
</head>
<body>
<label for="nombre">1-Seleccione el periodo de contrataci&oacute;n*:</label>
<br>
<form action="testcorreo2.asp" method="post"  name="form1">
<input style="margin-left:25px" TYPE="radio" NAME="gr1"  VALUE="360" onClick="Disab (1)" >60 € x 6 meses=360 €
<br>
<input style="margin-left:25px" TYPE="radio" NAME="gr1"  VALUE="720" onClick="Disab (2)">60 € x 12 meses=720 €
<br />
<label for="nombre">2-Seleccione la capacidad en disco contratada*:</label>
<br>
<input style="margin-left:25px" TYPE="radio" NAME="gr11" VALUE="60" disabled>
250 MB (aprox. 7.000 registros)=30 €/6 meses <br>
<input style="margin-left:25px" TYPE="radio" NAME="gr11" VALUE="80" disabled>
500 MB (aprox. 20.000 registros)=40 €/6 meses<br>
<input style="margin-left:25px" TYPE="radio" NAME="gr11" VALUE="120" disabled>
1 GB (aprox. 85.000 registros)=60 €/6 meses<br>	


<label for="nombre">2-Seleccione la capacidad en disco contratada*:</label>
<br>
<input style="margin-left:25px" TYPE="radio" NAME="gr12"  VALUE="60" disabled>
250 MB (aprox. 7.000 registros)=60 €/a&ntilde;o<br>
<input style="margin-left:25px" TYPE="radio" NAME="gr12"  VALUE="80" disabled>
500 MB (aprox. 20.000 registros)=80 €/a&ntilde;o<br>
<input style="margin-left:25px" TYPE="radio" NAME="gr12"  VALUE="120" disabled>
1 GB (aprox. 85.000 registros)=120 €/a&ntilde;o<br>
<br>
<input type="submit" name="comprar" onclick="valbutton(form1);return false;"   value="Siguiente" id="Submit" class="input90" />
</form>		
</body>
</html>
venga a pasarlo bien......