Foros del Web » Programando para Internet » Javascript »

aaaaaaaauuuuuuuuchhh

Estas en el tema de aaaaaaaauuuuuuuuchhh en el foro de Javascript en Foros del Web. , hasta el momento java me esta sacando la cresta como pueden ver. necesita ademas un codigo para validar unos campos de un formulario, el ...
  #1 (permalink)  
Antiguo 22/07/2003, 12:45
Avatar de maralbust@netsc  
Fecha de Ingreso: julio-2003
Ubicación: Santiago
Mensajes: 242
Antigüedad: 20 años, 10 meses
Puntos: 0
Busqueda aaaaaaaauuuuuuuuchhh

, hasta el momento java me esta sacando la cresta como pueden ver. necesita ademas un codigo para validar unos campos de un formulario, el cual se envia a una base de datos en php mysql.
  #2 (permalink)  
Antiguo 22/07/2003, 14:59
Avatar de pablinweb  
Fecha de Ingreso: julio-2003
Mensajes: 283
Antigüedad: 20 años, 9 meses
Puntos: 0
function Validar(form)
{

if (form.NombreDelObjeto.value == "")
{ alert("Leyenda a mostrar"); form.NombreDelObjeto.focus(); return; }

form.submit();
}

en el boton de envio del formulario pone:

onclick="Validar(this.form)"

Saludos
  #3 (permalink)  
Antiguo 22/07/2003, 15:14
Avatar de maralbust@netsc  
Fecha de Ingreso: julio-2003
Ubicación: Santiago
Mensajes: 242
Antigüedad: 20 años, 10 meses
Puntos: 0
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
function Validar(frm)
{

if (frm.txtPW.value == "")

{ alert("debe ingresar la password"); form.txtPW.focus(); return; }

frm.submit();
}
</script>
</head>

<body>
<table width="165" height=112 border=0 cellpadding=0 cellspacing=0>
<form name="frm" action="http://www.colegioelectronico.com/coe/session/chkUser.php3" method="post" target="_blank">
<tbody>
<tr bgcolor="#ffffff">
<td height=10 colspan="4"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#000056">
<img src="http://usuarios.lycos.es/maralbust/imagenes/intranet.gif" width="161" height="10">
</font></strong></font><br> <img src="http://usuarios.lycos.es/maralbust/imagenes/spacer.gif" width="1" height="1" border="0"></td>
</tr>
<tr>
<td width=16 height=10></td>
<td width=55 height=10><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Usuario</strong></font></td>
<td width=50 height=10><input type="text" name="txtNOMBRE" size="10" maxlength="10"></td>
<td width=44 height=10></td>
</tr>
<tr>
<td width=16 height=10></td>
<td width=55 height=10></td>
<td width=50 height=10><img height=3
src="http://usuarios.lycos.es/maralbust/botones/spacer.gif"
width=1> </td>
<td width=44 height=10></td>
</tr>
<tr>
<td width=16 height=10></td>
<td width=55 height=10><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Password</strong></font></td>
<td width=50 height=10><input type="password" name="txtPW" size="10" maxlength="10"></td>
<td width=44 height=10></td>
</tr>
<tr>
<td width=16 height=10></td>
<td width=55 height=10></td>
<td width=50 height=10><img height=8
src="http://usuarios.lycos.es/maralbust/botones/spacer.gif"
width=1> </td>
<td width=44 height=10></td>
</tr>
<tr>
<td width=16 height=32></td>
<td width=55 height=32></td>
<td width=50 height=32> <input name="image" type="image" src="http://usuarios.lycos.es/maralbust/imagenes/btnentrar.gif" onclick="Validar(this.form)"></td>
<td width=44 height=32></td>
</tr>
</form>
</table>
</body>
</html>


dime si esta mal, por que me sale el mensaje pero entra igual (obviamente con error.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:16.