Queria hacer un formulario que enviase mediante una cookie un valor para que en la siguiente pagina estuviese cargada dependiendo de que boton de radio hubiese elegido
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
No me ha salido nada
Os copio a ver que errores encontrais, llevo varios días dandole vueltas y no consigo nada
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
Un saludo
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<h2 align="center">
<script language="JavaScript">
function writeCookie(name, value, hours)
{
var expire = "";
if(hours != null)
{
expire = new Date((new Date()).getTime() + hours * 3600000);
expire = "; expires=" + expire.toGMTString();
}
document.cookie = name + "=" + escape(value) + expire;
}
function Enviar()
{
for(i=0; i<frmJuego.optNivel.length; i++)
{
if(frmJuego.optNivel[i].checked)
break;
}
//alert(document.all["optNivel"].name)
writeCookie("valor",frmJuego.optNivel[i].value,1000)
frmJuego.submit()
}
</script>
<FORM NAME="FORMULARIO">
<script language="JavaScript">
var ancho=3
for(j=0; j<ancho; j++)
{
document.writlen("<input type='radio' name='optNivel' value='("+j+")'>")
}
document.writlen("<input type='button' name='cmdJugar' value='Jugar' onClick='Enviar()'>")
</script>
</FORM>
</h2>
</body>
</html>