Cita:
Iniciado por caricatos
Hola:
En principio el evento se debe asociar al formulario (tag form), y no al botón...
Saludos :arriba.
Hola,
ya lo he modificado y sigue sin salir ningún mensaje que me indique que debo rellenar esos campos...!
<script>
function revisar() {
if (nombre == "") { alert("Rellene el nombre") ; return false ; }
if (poblacion == "") { alert('Rellene la población') ; return false ; }
if (email == "") { alert('Debes indicar un e-mail') ; return false ; }
if (telefono == "") { alert('Rellene un teléfono de contacto') ; return false ; }
}
</script>
<td width="439" valign="top">
<form method="post" onsubmit="revisar()" name="contact" enctype="multipart/form-data" action="mailform.php">
<table width="437" border="0">
<tr>
<td>
<label for="author">Nombre:</label>
</td>
<td colspan="2"><input name="nombre" type="text" id="nombre" value="" size="30" />
*</td>
</tr>
<tr>
<td>
<label for="author">Dirección:</label>
</td>
<td colspan="2"><input name="direccion" type="text" id="direccion" value="" size="40" /></td>
</tr>
a ver si me puede echar una mano...gracias