Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30/07/2003, 09:05
Avatar de Kaopectate
Kaopectate
Colaborador
 
Fecha de Ingreso: diciembre-2001
Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 22 años, 4 meses
Puntos: 38
Hola tom2000.

Prueba asi:

Código PHP:
<html>
 <
head>
  <
script language="JavaScript">
   function 
funcion(){
    var 
i;
    var 
msg "Debes rellenar al menos un campo";
    var 
todosVacios true;
    for (
07i++)
     
todosVacios todosVacios && (document.form1.elements[i].value == "");
    if (
todosVacios)
     
alert(msg);
    else
     
document.form1.submit();
   }
  
</script>
 </head>
 <body>
  <form name="form1">
   <input type="text" name="el0"><br>
   <input type="text" name="el1"><br>
   <input type="text" name="el2"><br>
   <input type="text" name="el3"><br>
   <input type="text" name="el4"><br>
   <input type="text" name="el5"><br>
   <input type="text" name="el6"><br>
   <input type="button" name="btn" value="Enviar" onclick="funcion()">
  </form>
 </body>
</html> 
Saludos.



NOTA: Matdor, tienes razón, lo que apuntas es un error