Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/08/2010, 17:35
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 13 años, 11 meses
Puntos: 310
Respuesta: comparar direccion de correo en un formulario

Cita:
Iniciado por martinuga Ver Mensaje
gracias por sus respuestas, pero aun estoy un poco perdido, aca les paso el codigo fuente que estoy utilizando, como podran ver lo que necesito es comparar dos textfield donde el primero es el mail y el segundo repetir mail y en el caso que no coinsidan que largue un alerta y borre lo que esta escrito en "repetir mail para que vuelva a ingresarlo.
este es el codigo:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<meta http-equiv="Content-Language" content="en-us" />
<LINK href="style.css" type=text/css rel=stylesheet />
<STYLE>
BODY {
scrollbar-arrow-color:ffffff;
scrollbar-shadow-color:0F2A48;
scrollbar-face-color:0F2A48;
scrollbar-highlight-color:0F2A48;
scrollbar-darkshadow-color:ffffff;
p {color: <#AWB_RGB NAME="Text Color" DEFAULT="#909090">; font-family: verdana, arial, helvetica, sans-serif; font-weight: normal; font-size: 10px; text-decoration: none}
</STYLE>

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" bgcolor="#FFFFFF">
<!-- saved from url=(0022)http://www.agamabuttons.com/ -->
<div id="Layer1" style="position:absolute; left:12px; top:522px; width:540px; height:253px; z-index:1">
<pre><font face="Arial, Helvetica, sans-serif"><strong><font size="3">Contacto:</font></strong></font></pre>
<pre><font size="3"><strong><font face="Arial, Helvetica, sans-serif">Gabriela Di Orio</font></strong></font></pre>
<pre><font size="3"><strong><font face="Arial, Helvetica, sans-serif">Bartoloni 154 - Victoria Entre Rios</font></strong></font></pre>
<pre><font size="3"><strong><font face="Arial, Helvetica, sans-serif">Tel: (03436) - 427248</font></strong></font></pre>
<pre><font size="3"><strong><font face="Arial, Helvetica, sans-serif">Cel: (0341) - 153109966</font></strong></font></pre>
</div>
&nbsp;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> <head>
<p>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Email Form </title></head>
<body>

<form method="post" action="sendeail.php">
<!-- DO NOT change ANY of the php sections -->
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<div align="left">
<pre><input type="hidden" name="ip" value="<?php echo $ipi ?>" /><input type="hidden" name="httpref" value="<?php echo $httprefi ?>" /><input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" /> <font size="3"> Nombre: </font>
<input type="text" name="visitor" size="35" />
<font size="3">Email:</font>
<input name="visitormail" type="text" size="35" />
<font size="3">Repetir</font> <font size="3">Email:</font>
<input name="visitormail2" type="text" size="35" />
<font size="3"> Telefono:</font>
<input name="ip3" type="text" size="35" />

<font size="3">Motivo :</font>
<select name="attn" size="1"> <option>Consulta</option> <option>Reserva</option> <option>Informacion</option> </select>
<font size="3">Cantidad de pasajeros :</font>
<select name="ip" size="1"><option>1</option><option>2</option><option>3</option><option>MAS...Especificar</option></select>
<font size="3"> Dias :</font>
<select name="ip2" size="1"><option>1</option><option>2</option><option>3</option><option>MAS...Especificar</option></select>


<font size="3">Mensaje : </font>
<textarea name="notes" rows="4" cols="40"></textarea>
<input type="submit" value="Enviar" />
</pre>
</div>
</form>

</body>
</html></p>
<pre>&nbsp;
</pre>
</body>
</html>
</label>
<p>&nbsp;</p>
</body>
</html>




</BODY>
</HTML>&nbsp;
<div align="center">
<center>
</center>
</div>


</BODY>&nbsp;
</p>
</body>
</html>
No te ofendas, pero ¿estás seguro de que sabes HTML y CSS? No sé si será un error de copy&paste pero hay como 17 </body> y </html>, una doctype declaration a mitad de código, la etiqueta font hace "siglos" que no se usa, o al menos no se recomienda su uso; etc. Por otro lado, los colores hexadecimales empiezan por #, pero en tu código CSS no aparecen.
Y para acabar, el código de GastonManatico es correcto (hasta cierto punto), el único fallo que tiene es que el formulario no se envía, pero si lo adaptas a tu código vale con que tengas el submit para enviar el form.

Saludos (:
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red

Última edición por _cronos2; 05/08/2010 a las 17:42