Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/03/2013, 12:37
saubietteleandro
 
Fecha de Ingreso: marzo-2013
Mensajes: 24
Antigüedad: 11 años, 1 mes
Puntos: 0
Pregunta No funciona script javascript

Buen dia gente: tengo un problema que no me funciona un script de validacion: este es codigo del script:

function ValidarForm()
{
if(document.getElementById("mail").value == "")
{
alert("No se ingreso el campo E-mail");
return false;
}

if(document.getElementById("usuario").value == "")
{
alert("No se ingreso el campo Usuario");
return false;
}

return true;
}

y el codigo el cual llama a este script es el siguiente:

<form action="sendMail.php" method="post" onsubmit="return ValidarForm();">

<label>Usuario: </label><br>

<input class="text" type="text" id="usuario" name="usuario"><br><br>

<label>E-mail</label><BR>
<input class="text" type="text" id="mail" name="mail"><br><br>

<input class="submit" type="submit" name="forget_pass" value="Recover password">

</form>


Alguien me podria indicar cual es el error por el cual no se activa el script?