Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/06/2004, 08:30
marco7661
 
Fecha de Ingreso: febrero-2004
Mensajes: 14
Antigüedad: 21 años, 2 meses
Puntos: 0
Gracias por responder. Lo estoy intentando pegar pero me da error.
Me podría indicar donde puedo pegarlo para que debajo de la petición de email me aparezca el mensaje una vez enviado la dirección de correo?

Gracias y saludos

<%@ Language=VBScript%>
<%

Comentario2 = Request.Form("comentario")

if Comentario2 <> "" then

Set conn=Server.CreateObject("ADODB.CONNECTION")
Set RS=Server.CreateObject("ADODB.RECORDSET")

conn.open ("usopinion")




SQL="INSERT INTO email (email) VALUES ('"&Comentario2&"');"



Conn.Execute(SQL)
Conn.Close


end if

%>


<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Pagina nueva 2</title>
</head>

<body bgcolor="#FFFEEA">



<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="462" id="AutoNumber1" height="370">
<tr>
<td width="100%" height="370" valign="top">
<p align="center"><font face="Verdana" style="font-size: 10pt"><br>
Si desea que le tengamos, puntualmente, informado y recibir nuestros boletines de
<u><b>Ofertas y Novedades</b></u>, no tiene m&aacute;s que indicarnos su e-mail y recibir&aacute; dicha informaci&oacute;n en su correo electr&oacute;nico. </font><br>
&nbsp; </p>

<FORM ACTION="boletin.asp?dado=1" METHOD="POST" name="myform">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="69%" id="AutoNumber2" height="120">
<tr>
<td width="100%" align="center" bgcolor="#0066CC" height="13">
<font face="Verdana" style="font-size: 8pt" color="#FFFFFF">BOLETÍN DE OFERTAS Y NOVEDADES </font></td>
</tr>
<tr>
<td width="100%" align="center" bgcolor="#E7F5FE" height="13">
<font face="Verdana" style="font-size: 8pt">Introduzca su E-mail </font></td>
</tr>
<tr>
<td width="100%" align="center" bgcolor="#B0E8FD" height="58">
<INPUT TYPE="text" NAME="comentario" size="48" maxlength=255 style="font-size: 8pt; font-family: Verdana"></td>
</tr>
<tr>
<td width="100%" align="center" bgcolor="#E7F5FE" height="31">
<font face="Verdana" size="1">
<INPUT TYPE="submit" VALUE="Enviar" style="font-family: Verdana; font-size: 10px"></font></td>
</tr>
</table>
</center>
</div>
</form>



</td>
</tr>
</table>



<script language="vbs">

function myform_onsubmit()


if(myform.comentario.value<>"")then
if(instr(1,myform.comentario.value,"@")=0)then
msgbox "Error : Dirección e-mail no válida." & chr(32)&chr(10) & "Ejemplo : [email protected]try ",vbexclamation,"Error de sintaxis"
myform.comentario.select()
myform_onsubmit=false
else



if(instr(1,myform.comentario.value,".")<>0)then


if(instr(1,myform.comentario.value,".")=len(myform .comentario.value))then



alert "La dirección no tiene un dominio"
myform.comentario.select
myform_onsubmit=false


end if


else
alert "La dirección de correo no es válida"
myform.comentario.select
myform_onsubmit=false
end if


if(instr(1,myform.comentario.value,chr(32))<>0)the n
alert "Un correo electrónico no puede usar espacios en blanco"&chr(32)&chr(10)&"El programa suprimirá los espacios en blanco."
myform.comentario.value=replace(myform.comentario. value,chr(32),"",1,1000)
end if

end if
elseif(myform.comentario.value="")then
alert "Por favor escriba una dirección e-mail"
myform_onsubmit=false
end if



end function
</script>