Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/06/2011, 12:30
gabrielcorr4
 
Fecha de Ingreso: octubre-2010
Ubicación: Guayaquil
Mensajes: 195
Antigüedad: 13 años, 6 meses
Puntos: 3
validacion campo vacio javascript

Hola estoy validando un campo vacio en js de un formulario , la alerta me sale bien, pero cuando lleno el campo con datos no me pasa a la siguiente pagina, ayuda por favor.

mi codigo:

Código PHP:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>

<
script language="JavaScript">
<!--
function 
verificar()
{
if(
form1.recuperar.value.replace(/ /g'') == '')
{
alert("Debe Ingresar un valor ");
form1.recuperar.focus();
form1.recuperar.select();
return 
false;
}
}
-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<style type="text/css">
.centrar {
    text-align: center;
}
</style>
</head>

<body>
<SPAN STYLE="position:absolute; top:45px; left:374px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 252px; height: 79px;" > 
 

<img src ="lovemoon.jpg" width="250" height="100" align="middle">

</SPAN>

 <SPAN STYLE="position:absolute; top:141px; left:315px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 403px; font-size: 24px; font-weight: bold;" > 
 
      CENTRO DE AYUDA LOVEMOON
 
</SPAN>  
    
<SPAN class="centrar" STYLE="position:absolute; top:170px; left:315px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 403px; font-size: 12px; font-weight: bold;" > 
 
     Escribe tu direecion de correo electronico en el cuadro que aparece abajo y te enviaremos los datos olvidados.
     
</SPAN>


<form name="form1" >
<form method="post" action="recuperar3.php">
<SPAN STYLE="position:absolute; top:185px; left:320px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 335px;" > 
 
 <br>
<input type="text" name="recuperar">
<input type="submit"  value="mandar" onClick="verificar()">
</form>

<img src ="luna sobre mar.jpg" width="570" height="500"
 STYLE="position:absolute; TOP:58px; LEFT:-105px; height: 381px;">

</body>
</html>