Retroceder   Foros del Web > Diseño de Sitios web > Web general

Respuesta
 
Herramientas Desplegado
Antiguo 16-may-2008, 18:14   #1 (permalink)
totoi está en el buen camino
 
Fecha de Ingreso: agosto-2003
Ubicación: america del sur
Mensajes: 8
problemas con redirigir formularios

les agradecere si pueden ver que pasa con este formulario que no hay caso que funcione( no envia el correo) pero al simplificarlo funciona perfectamente.
te agradezco de antemano

FORMULARIO QUE NO FUNCIONA



<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>contact us</title>
<script type="text/javascript">
<!--
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
<style type="text/css">
body {
margin-right: auto;
margin-left: auto;
}


.style66 {
font-family: Arial;
font-size: medium;
}
#nombre {
width: 420px;
}
#email {
width: 420px;
}
#mensaje {
width: 420px;
}
</style>
</head>

<body onload="FP_preloadImgs(/*url*/'button3.gif',/*url*/'button4.gif',/*url*/'button6.gif',/*url*/'button7.gif',/*url*/'button9.gif',/*url*/'buttonA.gif',/*url*/'buttonC.gif',/*url*/'buttonD.gif',/*url*/'buttonF.gif',/*url*/'button10.gif',/*url*/'button12.gif',/*url*/'button13.gif',/*url*/'button15.gif',/*url*/'button16.gif',/*url*/'button18.gif',/*url*/'button19.gif')" style="background-color: #DAB816; color: #564D1F;">

<div id="banner" style="position: absolute; width: 1000px; height: 262px; z-index: 1; top: 4px; left: 4px">
<div id="col_izq" style="position: absolute; width: 138px; height: 807px; z-index: 1; top: 286px; left: 1px; right: 861px; text-align: center; border-style: none; margin-right: 0px; background: #EED559 url('about_us.htm') 0px 0px; color: #564D1F;">
<div id="col_central" style="border-left: 2px solid #DAB816; border-right: 2px solid #DAB816; border-bottom: 2px solid #DAB816; background: #DAB816 url('about_us.htm') 0px 0px; position: absolute; width: 659px; height: 801px; z-index: 1; top: -2px; left: 135px; border-top-style: none; padding: 0px; color: #8D7D32; font-weight: 700;">
<table style="width: 100%; height: 30px">
<tr>
<td valign="top" style="background-color: #F7ECAE; font-size: large; color: #433C18; font-family: Tahoma; font-weight: 700;">

<strong style="font-size: large">START A NEW INQUIRY</strong></td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td>
<strong style="color: #433C18; font-family: Tahoma; font-size: small"><span class="style66">Thanks for visiting
patagoniashorex! <br />
Your comments are appreciated!</span></strong></td>
</tr>
</table>
<table style="width: 100%; height: 91px;">
<tr>
<td style="text-align: center; height: 68px;">
<strong style="color: #433C18; font-family: Tahoma; font-size: small; text-align: center">Note: <br />
This is NOT a reservation form
and you are NOT obligated to make a booking.<br />
We will NEVER ask you to enter sensitive information like
credit-card numbers via this website. <br />
We NEVER distribute or sell email addresses to ANY other
party.<br />
</strong></td>
</tr>
</table>
<br />


<script type="" language="javascript">


function ValidarFormulario(contacto) {


if (contacto.nombre.value == ""){
alert("NAME REQUIRED"); contacto.nombre.focus(); return;
}

if (contacto.email.value == "") {
alert("E-MAIL REQUIRED"); contacto.email.focus(); return;
}


if (contacto.email.value.indexOf('@', 1) == -1 || contacto.email.value.indexOf('.',
contacto.email.value.indexOf('@', 0)) == -1) {
alert("INVALID E-MAIL"); contacto.email.focus(); return;
}

if (contacto.mensaje.value == "") {
alert("MESSAGE REQUIRED");
contacto.mensaje.focus(); return;
}

/* Se envía el formulario */
contacto.submit();

}

</script>

<form name="contacto" action="http://sudominio.com/cgi-sys/FormMail.cgi" method="post" id="contacto" >

<input type="hidden" name="recipient" value="info@patagoniashorex.com"/>
<input type="hidden" name="subject" value="consulta desde la web"/>
<input type="hidden" name="redirect" value="http://www.patagoniashorex.com/confirmaconsulta.htm"/>


<table border="0" cellpadding="4" cellspacing="2" style="width: 92%; text-align: left;">
<tr valign="top">
<td style="width: 862px">
<p style="font-family: Arial; font-size: small; font-weight: 700; color: #433C18;">Name<br/>
<input type="text" name="nombre" id="nombre" size="50"/>
</p>
<p style="font-family: Arial; font-size: small; font-weight: 700; color: #433C18;">Email<br/>
<input type="text" name="email" id="email" size="50"/>

</p>
<p style="font-family: Arial; font-size: small; font-weight: 700; color: #433C18;">Country<br/>
<input type="text" name="pais" size="50" style="width: 420px"/>
</p>
<p>
<b style="color: #433C18">
Please enter any questions, comments or special
needs below.</b><br/>
<textarea name="mensaje" id="mensaje" rows="10"></textarea>
<br/>
</p>
</td>
</tr>
<tr valign="top">
<td style="width: 862px">




&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;




<input name="enviar" type="button" id="enviar" onclick="ValidarFormulario(contacto)" value="Submit" style="height: 48px; width: 91px; text-align: center;"/>

</td>



</tr>
</table>
</form>




</body>

</html>


================================================

FORMULARIO QUE SI FUNCIONA


<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
</head>
<body>
<form name="consultas" method="post" action="http://www.patagoniashorex.com/cgi-sys/FormMail.cgi">


<input type="hidden" name="recipient" value="info@patagoniashorex.com"/>
<input type="hidden" name="subject" value="consulta desde la web"/>
<input type="hidden" name="redirect" value="http://www.patagoniashorex.com/confirmaconsulta.htm"/>


<table width="90%" border="0" cellpadding="4" cellspacing="2">
<tr valign="top">
<td style="width: 862px"> <p>Nombre:<br/>
<input type="text" name="nombre" size="50"/>
</p>
<p>Email:<br/>
<input type="text" name="email" size="50"/>
</p>
<p>Pais:<br/>
<input type="text" name="pais" size="50"/>
</p>
<p>Mensaje:<br/>
<textarea name="mensaje" rows="10" cols="50"></textarea>
<br/>
</p></td>
</tr>
<tr valign="top">
<td style="width: 862px">

<input type="submit" name="submit" value="Enviar"/>

<input type="reset" value="Borrar" name="reset"/>



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp; </td>



</tr>
</table>
</form>



</body>

</html>
totoi está desconectado   Responder Citando
Antiguo 17-may-2008, 02:57   #2 (permalink)
bookmaster tiene algunos puntos positivos de karma
 
Avatar de bookmaster
 
Fecha de Ingreso: noviembre-2002
Ubicación: Toledo
Mensajes: 576
Respuesta: problemas con redirigir formularios

En el que no funciona tienes puesto esto:
Código HTML:
<form name="contacto" action="http://sudominio.com/cgi-sys/FormMail.cgi" method="post" id="contacto" >
Y en el que si esto otro:
Código HTML:
<form name="consultas" method="post" action="http://www.patagoniashorex.com/cgi-sys/FormMail.cgi">
La dirección del action no es la misma, lo mismo es un fallo a la hora de copiarlo aquí, pero hasta que no lo confirmes no te podría decir exactamente.

Otra cosa que tienes que comprobar es que en el:
Código HTML:
<input name="enviar" type="button" id="enviar" onclick="ValidarFormulario(contacto)" value="Submit" style="height: 48px; width: 91px; text-align: center;"/>
Lo deberias de hacer en el:
Código HTML:
<form name="contacto" action="http://sudominio.com/cgi-sys/FormMail.cgi" method="post" id="contacto" >
De la siguiente manera:
Código HTML:
<form name="contacto" onSubmit="ValidarFormulario(contacto)" action="http://www.patagoniashorex.com/cgi-sys/FormMail.cgi" method="post" id="contacto" >
A simple vista eso es lo que he encontrado.
bookmaster está desconectado   Responder Citando
Antiguo 17-may-2008, 12:08   #3 (permalink)
totoi está en el buen camino
 
Fecha de Ingreso: agosto-2003
Ubicación: america del sur
Mensajes: 8
Respuesta: problemas con redirigir formularios

Gracias era lo ultimo y ahora funciona. saludos
totoi está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 03:36.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93