Foros del Web » Programando para Internet » ASP Clásico »

Problema con formulario!!!

Estas en el tema de Problema con formulario!!! en el foro de ASP Clásico en Foros del Web. Hola a todos. Tengo un formulario hecho en una página ASP que funciona de maravilla, me envia los datos al mail y todo perfecto. Lo ...
  #1 (permalink)  
Antiguo 13/10/2004, 05:23
Avatar de Pablografia  
Fecha de Ingreso: abril-2004
Ubicación: Valencia, pero soy argentino
Mensajes: 68
Antigüedad: 21 años
Puntos: 0
Problema con formulario!!!

Hola a todos. Tengo un formulario hecho en una página ASP que funciona de maravilla, me envia los datos al mail y todo perfecto. Lo único que me falta son las páginas de confirmación y de error, que no tengo ni idea de como se hacen. Soy novato, por favor alguien que me ayude!!
Gracias
__________________
MAXIMUS EL HISPANO
  #2 (permalink)  
Antiguo 13/10/2004, 10:23
Avatar de AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años, 2 meses
Puntos: 535
Bueno, así en el aire mucho no se puede hacer.
Mejor mostrá el código del form y del script que envía el mail, cuales serían los errores a controlar y se puede ver..
__________________
...___...
  #3 (permalink)  
Antiguo 13/10/2004, 11:01
Avatar de Pablografia  
Fecha de Ingreso: abril-2004
Ubicación: Valencia, pero soy argentino
Mensajes: 68
Antigüedad: 21 años
Puntos: 0
Este es el codigo del form:
<form name="form1" method="post" action="">
<table align="center" border="0" cellpadding="0"
cellspacing="0" height="173" width="626">
<tbody>
<tr>
<tr>
<td height="28" valign="top" width="76">
<p><font color="#ffffff"
face="Arial, Helvetica, sans-serif" size="2"><strong>Name:</strong></font></p>
</td>
<td height="28" valign="top">
<p><font size="2">
<input name="nombre" type="text" id="nombre"
size="32">
</font> </p>
</td>
<td valign="top" width="96">
<p><font color="#ffffff"
face="Arial, Helvetica, sans-serif" size="2"><strong>Company:</strong></font></p>
</td>
<td valign="top">
<p> <input name="empresa" id="empresa" size="32"
type="text"> </p>
</td>
</tr>
<tr>
<td height="28" valign="top">
<p><font color="#ffffff"
face="Arial, Helvetica, sans-serif" size="2"><strong>Phone:</strong></font></p>
</td>
<td height="28" valign="top">
<p> <input name="telefono" id="telefono" size="32"
type="text"> </p>
</td>
<td valign="top">
<p><font color="#ffffff"
face="Arial, Helvetica, sans-serif" size="2"><strong>E-mail:</strong></font></p>
</td>
<td valign="top">
<p> <input name="email" id="email" size="32"
type="text"> </p>
</td>
</tr>
<tr>
<td rowspan="2" height="28" valign="top">
<p><font color="#ffffff"
face="Arial, Helvetica, sans-serif" size="2"><strong>Web:</strong></font></p>
</td>
<td height="28" valign="top">
<p> <input name="web" id="web" size="32"
type="text"> </p>
</td>
<td rowspan="2" height="28" valign="top">
<p><font color="#ffffff"
face="Arial, Helvetica, sans-serif"><strong><font size="2">Comments</font>:</strong></font></p>
<p>&nbsp;</p>
</td>
<td align="right" valign="top" width="192"> <textarea name="textarea" cols="24" rows="3"></textarea></td>
</tr>
<tr>
<td height="28" valign="top" width="262">
<div align="right"> </div>
<br>
</td>
<td align="left" height="28" valign="bottom">
<div align="right">
<p> <input name="Submit" value="Send" type="submit">
</p>
</div>
</td>
</tr>
</tbody>
</table>
</form>

Y este el del scrip:
<%
dim mensaje
set objcdomail=server.createobject("CDONTS.NewMail")
objcdomail.from=""& request.form("nombre")&""
objcdomail.to="[email protected]"
objcdomail.subject="Contacto: "&"Página Cempaka en Inglés"&""
mensaje=""&request.form("textarea")&""
body = body & "Nombre: " & request.form("nombre") & VBNEWLINE
body = body & "Empresa: " & request.form("empresa") & VBNEWLINE
body = body & "Teléfono: " & request.form("telefono") & VBNEWLINE
body = body & "Email: " & request.form("email") & VBNEWLINE
body = body & "Web: " & request.form("web") & VBNEWLINE & VBNEWLINE
objcdomail.body= body & mensaje
objcdomail.send
set objcdomail=nothing
%>

Gracias
__________________
MAXIMUS EL HISPANO
  #4 (permalink)  
Antiguo 13/10/2004, 11:19
Avatar de jUaN_  
Fecha de Ingreso: septiembre-2002
Ubicación: Buenos Aires - Argentina
Mensajes: 220
Antigüedad: 22 años, 7 meses
Puntos: 0
proba con este

<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<meta http-equiv="pragma" content="no-cache">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail")
mySmartMail.Server = "10.1.3.167"
mySmartMail.SenderAddress = "[email protected]"
mySmartMail.Recipients.Add "[email protected]"
mySmartMail.Subject = "FORMULARIO DE ALTA O MODIFICACION DE REMEDY"

FECHA_SOLICITUD = request.form("FECHA_SOLICITUD")
ID_RED = request.form("ID_RED")
APELLIDO_PADRE = request.form("APELLIDO_PADRE")
APELLIDO_MADRE = request.form("APELLIDO_MADRE")
NOMBRES = request.form("NOMBRES")
DOCUMENTO = request.form("DOCUMENTO")
MAIL = request.form("MAIL")
CECO = request.form("CECO")
SECTOR = request.form("SECTOR")
CENTRO = request.form("CENTRO")
EDIFICIO = request.form("EDIFICIO")
EMPRESA = request.form("EMPRESA")
GERENCIA = request.form("GERENCIA")
INTERNO = request.form("INTERNO")
OFICINA = request.form("OFICINA")
CONTRATADO = request.form("CONTRATADO")
cuerpo = cuerpo & "****************************" & VBNEWLINE
cuerpo = cuerpo & "FORMULARIO DE ALTA DE REMEDY" & VBNEWLINE
cuerpo = cuerpo & "============================" & VBNEWLINE & VBNEWLINE
cuerpo = cuerpo & "FECHA DE LA ACTUALIZACION: " & FECHA_SOLICITUD & VBNEWLINE
cuerpo = cuerpo & "ID RED: " & ID_RED & VBNEWLINE
cuerpo = cuerpo & "APELLIDO PATERNO: " & APELLIDO_PADRE & VBNEWLINE
cuerpo = cuerpo & "APELLIDO MATERNO: " & APELLIDO_MADRE & VBNEWLINE
cuerpo = cuerpo & "NOMBRES: " & NOMBRES & VBNEWLINE
cuerpo = cuerpo & "NUM. DOCUMENTO: " & DOCUMENTO & VBNEWLINE
cuerpo = cuerpo & "MAIL: " & MAIL & VBNEWLINE
cuerpo = cuerpo & "CECO: " & CECO & VBNEWLINE
cuerpo = cuerpo & "SECTOR: " & SECTOR & VBNEWLINE
cuerpo = cuerpo & "CENTRO: " & CENTRO & VBNEWLINE
cuerpo = cuerpo & "EDIFICIO: " & EDIFICIO & VBNEWLINE
cuerpo = cuerpo & "EMPRESA: " & EMPRESA & VBNEWLINE
cuerpo = cuerpo & "GERENCIA: " & GERENCIA & VBNEWLINE
cuerpo = cuerpo & "INTERNO: " & INTERNO & VBNEWLINE
cuerpo = cuerpo & "OFICINA: " & OFICINA & VBNEWLINE
cuerpo = cuerpo & "CONTRATADO: " & CONTRATADO & VBNEWLINE
mySmartMail.Body = cuerpo
On Error Resume Next
mySmartMail.SendMail
if Err ><0 then
response.write "Error, no se ha podido completar la operación"
else
Request.Form("nombre")
saludo = "Gracias por escribirnos: " & NOMBRES & " " & APELLIDO_PADRE & " " & APELLIDO_MADRE & ", el formulario de alta o modificacion de remedy se ha enviado correctamente, y sera actualizado a la brevedad."
response.write saludo end if
%>
<html>
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
-->
</style><head>
<title>.:GRACIAS POR ESCRIBIRNOS, SU PEDIDO SERA ATENDIDO A LA BREVEDAD:.</title>
<link href="color.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>
</html>

solo cambia el aspsmartmail por el que uses a mi me funca de diezz
__________________
<% Viru %>
  #5 (permalink)  
Antiguo 13/10/2004, 11:26
Avatar de Pablografia  
Fecha de Ingreso: abril-2004
Ubicación: Valencia, pero soy argentino
Mensajes: 68
Antigüedad: 21 años
Puntos: 0
Gracias

Gracias maestruli!!!
__________________
MAXIMUS EL HISPANO
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:07.