tengo otra opcion donde tu tienes unos check y te muestra los q estan seleccionados.. es totalmente aplicable a cajas d textos y otros objetos.
ahi ta:
Código HTML:
<head> <script language="JavaScript">
function valores()
{
var sw=0;
for(c=1; c<=4; c++)
{
if (document.forms['formulario']['box'+c].checked==true)
{
sw=1;
break;
}
}
if (sw==1)
{
var msje='';
for(c=1; c<=4; c++)
{
if (document.forms['formulario']['box'+c].checked==true)
msje=msje+" "+document.forms['formulario']['box'+c].value+",";
}
document.forms['formulario']['destino'].value=msje;
}else
{
alert("no ha selecccionado nada");
}
}
</script>
</head>
<body>
<form name="formulario" action="nuevo.html" method="get">
<input type="checkbox" value="1" name="box1">opcion 1
<BR>
<input type="checkbox" value="2" name="box2">opcion 2
<BR>
<input type="checkbox" value="3" name="box3">opcion 3
<BR>
<input type="checkbox" value="4" name="box4">opcion 4
<BR>
<input type="button"value="ver" onClick="valores()">
<input type="text" name="destino">
</form>
</body>
ojala uno d estos te sirva!!
saludos y cuentame como te va