RE: [PHP-ES] Sencillo formulario en javascript
| From: | Abraham Vega Carrasco | Date: | Wed, 03 Dec 2003 13:05:13 +0000 |
| Subject: | RE: [PHP-ES] Sencillo formulario en javascript | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-43239@lists.php.net to get a copy of this message | ||
Mensaje citado por Pedro Gomez <phx_spain@hotmail.com>:
> Hola:
> No hay forma de que funcione. Lo he cambiado como comentó Jose Luis
> Pumarega pero sigue sin funcionar.
> Por cierto, sigue diciendo que hay un error de ejecución en la linea 4 (la
> de <script language...") y que esperava un identificador.
> Ahora queda esí, pero sigue sin funcionar:
>
> <html>
> <head>
> <title></title>
> <script language="JavaScript">
> function Validar(this)
> {
> if (this.AdmName.href=="")
> alert("Debe rellenar todos los campos");
> else
> alert("Ahora lo has hecho bien");
> }
> </script>
> </head>
>
> <body>
> <form name="formulario" method="POST"
> action="Administra.php">
> Nombre
> <input type="text" size=16 name="AdmName">
> Contraseña
> <input type="text" size=16 name="AdmPass" value="">
> <input type="button" value="Entrar >>"
> onclick="Validar(this)">
> </form>
> </body>
> </html>
>
> _________________________________________________________________
> Una mejor experiencia en Internet. Prueba gratis dos meses MSN 8.
> http://join.msn.com/?pgmarket=es-es&XAPID=1577&DI=1055
>
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> via news: news://news.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>
>
trata con esto
<html>
> <head>
> <title></title>
> </head>
<script language="JavaScript">
<!--
function Validar(this)
{
if (this.AdmName.href=="")
alert("Debe rellenar todos los campos");
else
alert("Ahora lo has hecho bien");
}
//-->
</script>
> <body>
> <form name="formulario" method="POST"
> action="Administra.php">
> Nombre
> <input type="text" size=16 name="AdmName">
> Contraseña
> <input type="text" size=16 name="AdmPass" value="">
> <input type="button" value="Entrar >>"
> onclick="Validar(this)">
> </form>
> </body>
> </html>
-------------------------------------------------
Este correo fue enviado por http://alumnos.utalca.cl