Ver Mensaje Individual
  #5 (permalink)  
Antiguo 27/12/2006, 15:32
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años, 1 mes
Puntos: 772
Re: 2 Acciones en un Onsubmit

Hola caricatos

A mí también me ha sorprendido, pero he hecho una prueba y no me ha funcionado. La verdad es que no entiendo porqué.

Se me ha ocurrido hacerlo de esta forma:
Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
verificarFormu(frm) {
  if (
frm['txt1'].value == '') return false;
    else return 
validacion(frm);
}
function 
validacion(frm) {
  if (
frm['txt2'].value == '') return false;
}
</script>
</head>
<body>
<form action="javascript:alert('Enviando')" onsubmit="return verificarFormu(this)">
<input type="text" name="txt1" />
<input type="text" name="txt2" />
<input type="submit" />
</form>
</body>
</html> 
Saludos,