Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/12/2007, 13:25
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Re: Validar formulario cuando marco un check

Hola Galletero

A ver si este ejemplo te sirve de ayuda:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
validar(frm) {
  if(
frm.obliga.value=='')
    return 
false;
}
</script>
</head>
<body>
<form action="algo.php" onsubmit = "if(chk.checked) return validar(this)">
<input type="checkbox" name="chk" />
<input type="text" name="obliga" />
<input type="submit" />
</form>
</body>
</html> 
Saludos,