Foros del Web » Programando para Internet » Javascript »

Error Con Las Cookies

Estas en el tema de Error Con Las Cookies en el foro de Javascript en Foros del Web. ALGUIEN SABE POR QUE LA SIGUIENTE PARTE DEL CODIGO ( Mailer.Bodytext = Cuerpo & "Producto " + " : " & Producto & index & ...
  #1 (permalink)  
Antiguo 26/11/2006, 06:27
 
Fecha de Ingreso: noviembre-2006
Ubicación: BARCELONA
Mensajes: 30
Antigüedad: 17 años, 5 meses
Puntos: 0
Exclamación Error Con Las Cookies

ALGUIEN SABE POR QUE LA SIGUIENTE PARTE DEL CODIGO ( Mailer.Bodytext = Cuerpo & "Producto " + " : " & Producto & index & VbCrLf & "Cantidad " + " : " & Cantidad & index & VbCrLf & "ProductoTotal " + " : " & ProductoTotal & index & VbCrLf ) DE UNA PAGINA .ASP QUE ENVIA UN E-MAIL ME DEVUELVE MAL LAS COOKIES Y EL E-MAIL RESULTA ASÍ

//Inicio incorrecto que devuelve el valor 10 ?????? para Producto Cantidad y Producto total:

Producto . : 10 Cantidad . : 10 ProductoTotal . : 10

//Esta parte es correcta:

Total . : 2.00 Euros
Nombre . : NOMBRE
Domicilio . : CALLE TAL
Ciudad . : CIUDAD
Codigo Postal . : 11111
email . : [email protected]
Telefono . : 44444444


EL CODIGO COMPLETO ES :

<%@ Language=VBScript %>
<%
Dim producto, Cantidad, productoTotal, Total, email, index
producto = Request.form("producto" & index)
Cantidad = Request.form("Cantidad" & index)
productoTotal = Request.form("productoTotal" & index)
Total = Request.form("Total" & index)
For index = 1 to Request.form.Count
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "xxx"
Mailer.FromAddress = "postmaster@ddddddddd"
Mailer.AddRecipient"ffffff","[email protected]"
Mailer.Subject = "PEDIDO"
Mailer.ContentType = "text/html"
Mailer.charset = 2
Mailer.RemoteHost = "smtpMail.activeisp.com"
Cuerpo = "<HTML><BODY bgColor=""#FFFF80""><body style=""font-family: Century Gothic""><br><TABLE cellSpacing=""0"" cellPadding=""2"" width=""400"" align=""center"" bgColor=""#FFFF80"" border=""0""><TR><TD Align=""left""></BODY></HTML>"
Mailer.BodyText = Cuerpo
Mailer.Bodytext = Cuerpo & "Producto " + " . : " & Producto & index & VbCrLf & "Cantidad " + " . : " & Cantidad & index & VbCrLf & "ProductoTotal " + " . : " & ProductoTotal & index & VbCrLf
next
Mailer.Bodytext = Cuerpo & "Total" + " : " + Total + " Euros "
Mailer.Bodytext = Cuerpo & "Nombre " + " : " + Request.form("nombre") + VbCrLf
Mailer.Bodytext = Cuerpo & "Domicili " + " : " + Request.form("domicilio") + VbCrLf
Mailer.Bodytext = Cuerpo & "Ciudad " + " : " + Request.form("ciudad") + VbCrLf
Mailer.Bodytext = Cuerpo & "Codigo Postal " + " : " + Request.form("cp") + VbCrLf
Mailer.Bodytext = Cuerpo & "email " + " : " + Request.form("email") + VbCrLf
Mailer.Bodytext = Cuerpo & "Telefono " + " : " + Request.form("telefono") + VbCrLf
Mailer.sendmail
if Mailer.SendMail then
response.write ("OK")
else
response.write ("NO OK.")+ Mailer.Response
end if
%>
  #2 (permalink)  
Antiguo 26/11/2006, 17:33
 
Fecha de Ingreso: noviembre-2006
Ubicación: BARCELONA
Mensajes: 30
Antigüedad: 17 años, 5 meses
Puntos: 0
Es Un Problema De Orden, Lo He Resuelto

ES UN PROBLEMA DE ORDEN, Y CON AYUDA LO HE RESUELTO EN PARTE


<%@ Language=VBScript %>
<%
Dim producto, Cantidad, productoTotal, Total, email, index

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")


Mailer.FromName = "texto"
Mailer.FromAddress = "[email protected]"
Mailer.AddRecipient"[email protected]"
Mailer.Subject = "teto"
Mailer.Bodytext = "texto"
Mailer.ContentType = "text/html"
Mailer.charset = 2
Mailer.RemoteHost = "smtpMail.dominio.com"
Cuerpo = "<HTML><BODY bgColor=""#FFFF80""><body style=""font-family: Century Gothic; font-weight: bold""><br></BODY></HTML>"

For index = 1 to Request.Form.Count

producto = Request.form("producto" & index)
Cantidad = Request.form("Cantidad" & index)
productoTotal = Request.form("productoTotal" & index)


Mailer.Bodytext = Cuerpo & Cantidad & " unidad/es " & VbCrLf & " &nbsp;&nbsp;&nbsp;&nbsp; " & Producto & VbCrLf & " &nbsp;&nbsp;&nbsp;&nbsp; " & "Total " + " :&nbsp;&nbsp;&nbsp;&nbsp; " & ProductoTotal & " Euros " & VbCrLf

next
Total = Request.form("Total")
Mailer.Bodytext = Cuerpo & "TOTAL A PAGAR" + " . : " + Total + " Euros "


Mailer.Bodytext = Cuerpo & "Nombre&nbsp.&nbsp;&nbsp;&nbsp;" + " . : " + Request.form("nombre") + VbCrLf
Mailer.Bodytext = Cuerpo & "Domicilio.&nbsp;&nbsp;&nbsp;" + " . : " + Request.form("domicilio") + VbCrLf
Mailer.Bodytext = Cuerpo & "Ciudad.&nbsp;&nbsp;&nbsp;" + " . : " + Request.form("ciudad") + VbCrLf
Mailer.Bodytext = Cuerpo & "Codigo Postal....&nbsp;&nbsp;" + " . : " + Request.form("cp") + VbCrLf
Mailer.Bodytext = Cuerpo & "email....&nbsp;&nbsp;&nbsp;" + " . : " + Request.form("email") + VbCrLf
Mailer.Bodytext = Cuerpo & "Telefono.:&nbsp;&nbsp;&nbsp;" + " . : " + Request.form("telefono") + VbCrLf
Mailer.sendmail
if Mailer.SendMail then
response.write ("OK")
else
response.write ("NO OK.")+ Mailer.Response
end if
%>
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 16:51.