
26/04/2004, 08:13
|
 | Moderador extraterrestre | | Fecha de Ingreso: diciembre-2001 Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 2 meses Puntos: 61 | |
Prueba con esto:
<html>
<head>
<title>Untitled</title>
</head>
<body>
<script language="JavaScript">
function entremos()
{
if (window.document.password.rut.value=="")
{
alert("Debe completar el campo 'Rut'");
window.document.password.rut.focus ();
return false;
}
}
</script>
<form name="password" onsubmit="return entremos();" id="password" method="post" action="ventas_add1_prueba.php">
<tr>
<td width="50%" align="right">
<input name="rut" type="text" value="" size="14" maxlength="12">
</td>
<td width="40%"> <input class="boton10" type="submit" name="Submit2" value="Aceptar" >
</td>
</tr>
<tr>
<td height="25"> </td>
<td> </td>
</tr>
</form>
</body>
</html>
En resumidas cuentas consiste en poner el onclick del botón de submit en un onsubmit de la etiqueta form.
Espero que te sirva!
__________________ Cómo escribir
No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia. |