Ir para conteúdo
Fórum Script Brasil
  • 0

(Resolvido) Formulario em HTML+ASP+CDOSYS


MLMDesigner

Pergunta

Ai meu povo...to com um problemaço aqui pois não sei nada de ASP e tive q fazer um formulario q esta funcionando maravilhosamente bem pra mandar e-mail via site..... mas preciso que quando o usuário clicar no botão enviar não seja enviado se os campos do formulário não tenha sido preenchidos completamente se alguém puder me ajudar..... estou desesperado... obrigado... Marcelo.

Segue o arquivo em html e o arquivo asp para quem puder me ajudar.

ARQUIVO HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    &lt;script language="JavaScript">

   var width = 550;
   var height = 550;

   var left = 100;
   var top = 100;

URL = "http://www.graciinfo.com.br/promocao.jpg";

   window.open(URL,'Natal', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=yes, fullscreen=no');

</script>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <title>GracIInfo Informática - A Sua Empresa Rumo ao Futuro.</title>
    <link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />
    
<style type="text/css">
<!--
body {
    background-color: #328CBE;
}
a:link {
    color: #057BB8;
}
.style1 {color: #000000}
a:visited {
    color: #057BB8;
}
a:hover {
    color: #057BB8;
}
a:active {
    color: #057BB8;
}
.style6 {
    font-size: 10px;
    font-weight: bold;
}
#apDiv1 {
    position:absolute;
    left:488px;
    top:64px;
    width:488px;
    height:434px;
    z-index:1;
}
.style8 {color: #057BB8}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style></head>

<body>
  <div id="wrapper">
    <div id="header"> </div>
    <div id="left">
      <div id="logo">
        <h1> </h1>
      </div>
      <div id="nav">
        <ul>
          <li class="important"><a href="index.html" class="style1">Home</a></li>
          <li><a href="empresa.html">A Empresa</a></li>
          <li><a href="servicos.html">Serviços</a></li>
          <li><a href="softwares.html">Softwares</a></li>
          <li><a href="localizacao.html">Localização</a></li>
          <li><a href="contato.html">Contato</a></li>
                 </ul>
      </div>
      <div id="news">
        <h2 align="left">Proteu - Sistema de Clínicas</h2> 
        <p align="left"><img src="images/proteu_left.jpg" alt="" width="153" height="86" /></p>
        <p class="more"><span class="style6"><a href="softwares.html">Saiba mais</a></span></p>
        <div class="hr-dots"> </div>
        <h3 align="left">Desenvolvimento e Soluções</h3> 
        <p align="left"><img src="images/oftalmologia_left.jpg" alt="" width="129" height="125" /></p>
        <p align="justify">Desenvolvemos soluções que visam aumentar a competitividade da sua   empresa com o que há de melhor nos campos médico-laboratorial e setor de   clínicas.<br />
        </p>
        <p class="more"><a href="desenvolvimento_solucoes.html" target="_parent">Saiba mais</a></p>
      </div>
      <div id="support">
        <p> </p>
      </div>
    </div>
    <div id="right">
      <h2>Faça seu cadastro e Baixe a Demonstração</h2>
      <div id="welcome">
           <head>
        <title>Formulário de Contato</title>
        </head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body bgcolor="#FFFFFF" text="#000000">
<div align="center">
        <p class="style8">Formulario para Cadastro</p>
        <p class="style8">Faça o Cadastro que você será redirecionado para fazer o DownLoad. Obrigado.</p>
            <form method="post" enctype="multpart/formdata" name="form1" action="enviar.asp">
            <table width="47%" border="0" cellspacing="2" cellpadding="2">
            <tr>
            <td width="33%"><span class="style9">Nome: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="nomerem" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">E-mail: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="emailrem" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Empresa: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="empresa" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Endereço: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="endereço" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Cidade: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="cidade" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">UF: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="uf" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Telefone: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="telefone" size="15">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Celular: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="celular" size="15">
            </font></td>
            </tr>
            <tr>
            <td colspan="2">
            <div align="center">
            <input type="submit" name="Submit" value="Enviar">
            <input type="reset" name="reset" value="Limpar">
            </div></td>
            </tr>
            </table>
            </form>
        </div>
        <p align="justify"> </p>
      
      </div>
      <div id="profile">
        <div> 
        </div>
        <div class="clear"> </div>
        <p class="more"> </p>
      </div>
    </div>
    <div class="clear"> </div>
    <div id="spacer"> </div>
    <div id="footer">
      <div id="copyright">
        Copyright © 2008 GracIInfo Informática - Todos Direitos Reservados.      </div>
      <div id="footerline"></div>
    </div>
    
  </div>
  &lt;script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
&lt;script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2567912-1");
pageTracker._trackPageview();
</script>
</body>
&lt;script type="text/javascript">   
  
/******************************************  
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)  
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code  
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use  

Clubepc.org  
******************************************/  
function openwindow(){   
window.open("autumn_effect.htm","","width=350,height=500")   
}   
  
//Configure below to change URL path to the snow image   
var snowsrc="6uscqjq.gif"  
// Configure below to change number of snow to render   
var no = 20;   
// Configure whether snow should disappear after x seconds (0=never):   
var hidesnowtime = 0;   
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")   
var snowdistance = "pageheight";   
  
///////////Stop Config//////////////////////////////////   
  
var ie4up = (document.all) ? 1 : 0;   
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;   
  
function iecompattest(){   
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body   
}   
  
var dx, xp, yp;    // coordinate and position variables   
var am, stx, sty;  // amplitude and step variables   
var i, doc_width = 800, doc_height = 600;   
  
if (ns6up) {   
doc_width = self.innerWidth;   
doc_height = self.innerHeight;   
} else if (ie4up) {   
doc_width = iecompattest().clientWidth;   
doc_height = iecompattest().clientHeight;   
}   
  
dx = new Array();   
xp = new Array();   
yp = new Array();   
am = new Array();   
stx = new Array();   
sty = new Array();   
snowsrc=(snowsrc.indexOf("clubepc.org")!=-1)? "snow.gif" : snowsrc   
for (i = 0; i < no; ++ i) {   
dx[i] = 0;                        // set coordinate variables   
xp[i] = Math.random()*(doc_width-50);  // set position variables   
yp[i] = Math.random()*doc_height;   
am[i] = Math.random()*20;         // set amplitude variables   
stx[i] = 0.02 + Math.random()/10; // set step variables   
sty[i] = 0.7 + Math.random();     // set step variables   
if (ie4up||ns6up) {   
if (i == 0) {   
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://www.clubepc.org\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");   
} else {   
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");   
}   
}   
}   
  
function snowIE_NS6() {  // IE and NS6 main animation function   
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;   
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;   
for (i = 0; i < no; ++ i) {  // iterate for every dot   
yp[i] += sty[i];   
if (yp[i] > doc_height-50) {   
xp[i] = Math.random()*(doc_width-am[i]-30);   
yp[i] = 0;   
stx[i] = 0.02 + Math.random()/10;   
sty[i] = 0.7 + Math.random();   
}   
dx[i] += stx[i];   
document.getElementById("dot"+i).style.top=yp[i]+"px";   
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";   
}   
snowtimer=setTimeout("snowIE_NS6()", 300);   
}   
  
function hidesnow(){   
if (window.snowtimer) clearTimeout(snowtimer)   
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"  
}   
  
if (ie4up||ns6up){   
snowIE_NS6();   
if (hidesnowtime>0)   
setTimeout("hidesnow()", hidesnowtime*1000)   
}   
  
</script> 
</html>
______________________________________________________________________________________________ ARQUIVO ASP
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")

    cdoConfig.Fields.Item(sch & "sendusing") = 2
    cdoConfig.Fields.Item(sch & "smtpauthenticate") = 1
    cdoConfig.Fields.Item(sch & "smtpserver") = "smtp.MEU DOMINIOcom.br"
    cdoConfig.Fields.Item(sch & "smtpserverport") = 25
    cdoConfig.Fields.Item(sch & "smtpconnectiontimeout") = 30
    cdoConfig.Fields.Item(sch & "sendusername") = "MEU DOMINIO.COM.BR" 'conta@seu_dominio
    cdoConfig.Fields.Item(sch & "sendpassword") = "xxxxx"
    cdoConfig.fields.update
    Set cdoMessage = Server.CreateObject("CDO.Message")
    Set cdoMessage.Configuration = cdoConfig

        cdoMessage.From = "formulario@graciinfo.com.br" 'ENDEREÇO DE E-MAIL QUE SERÁ EXIBIDO NO FROM DA MENSAGEM
        cdoMessage.To = "formulario@graciinfo.com.br" 'ex: conta@seu_dominio, conta@uol.com.br, conta@hotmail
        cdoMessage.Subject = "Formulario de Contato"

    strBody = "Dados" & vbCrLf & vbCrLf & _
    "Nome:"& Request("nomerem")& vbCrLf & _
    "E-Mail:"& Request("emailrem")& vbCrLf & _
    "Empresa:"& Request("empresa")& vbCrLf & _
    "Endereço:"& Request("endereço")& vbCrLf & _
    "Cidade:"& Request("cidade")& vbCrLf & _
    "UF:"& Request("uf")& vbCrLf & _
    "Telefone:"& Request("telefone")& vbCrLf & _
    "Celular:"& Request("celular")& vbCrLf & _

        strBody = strBody & "."
        cdoMessage.HTMLBody = strBody

    cdoMessage.Send

        Set cdoMessage = Nothing
        Set cdoConfig = Nothing

Response.Redirect("obrigado.html?" & EmailFrom)
%>

Link para o comentário
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0

MLM Designer...

Tem como fazer isso com asp... mas em todas minhas app's prefiro usar alertas em JavaScript porque os mesmos acontecem no lado cliente e antes de submeter o form, mantendo o cliente na mesma tela do form...

Caso siga meu conselho me avisa que eu movo seu tópico para a sala adequada...

Em asp funciona com condicionais, mais ou menos assim:

'no começo do codigo:
if campo1_form = "" then
response.write "campo x vazio!"
esponse.end
elseif campo2_form = "" then
responsewrite "campo y vazio
response.end
elseif campo1_form <> "" then
response.write "mensagem enviada com sucesso!"
response.end
elseif campo2_forme <> "" then
response.write "mensagem enviada com sucesso!"
response.end
end if

Sacou? fico no aguardo... recomendo fortemente tentar em JavaScript com alertas OnSubmit

[]'s Rafael Spilki

Link para o comentário
Compartilhar em outros sites

  • 0

Bom... aqulio ali é bem no início do codigo asp...

Mas vamos assim... faz em JS que eu te garato que é melhor... mesmo assim tali a dica de como se faz em asp!

To mandando pra JS pra você descobrir como se faz alertas com retorno falso do tipo OnSubmit...

[]'s Rafael Spilki

Link para o comentário
Compartilhar em outros sites

  • 0

Você tem que mudar seu form para verificar os dados no evento "Onsubmit"

O seu código (sem a parte em ASP) ficaria mais ou menos asim:

<html>
<head>
<title>Minha página</title>
<script type="text/javascript">
function Confirma() {
if (document.form1.nomerem.value=="") {
alert("O campo 'nome' não pode ficar em branco !")
return false
}else if (document.form1.emailrem.value=="") {
alert("Digite seu e-mail !")
return false
}else if(document.form1.empresa.value=="") {
alert("Digite o nome da empresa !")
return false
}
}
</script>
</head>
<form method="post" enctype="multpart/formdata" name="form1" action="enviar.asp" onsubmit="return Confirma()">
<table width="47%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="33%"><span class="style9">Nome: </span></td>
<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="nomerem" size="45">
</font></td>
</tr>
<tr>
<td width="33%"><span class="style9">E-mail: </span></td>
<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="emailrem" size="45">
</font></td>
</tr>
<tr>
<td width="33%"><span class="style9">Empresa: </span></td>
<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="empresa" size="45">
</font></td>
</tr>
<tr>
<td width="33%"><span class="style9">Endereço: </span></td>
<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="endereço" size="45">
</font></td>
</tr>
<tr>
<td width="33%"><span class="style9">Cidade: </span></td>
<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="cidade" size="45">
</font></td>
</tr>
<tr>
<td width="33%"><span class="style9">UF: </span></td>
<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="uf" size="45">
</font></td>
</tr>
<tr>
<td width="33%"><span class="style9">Telefone: </span></td>
<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="telefone" size="15">
</font></td>
</tr>
<tr>
<td width="33%"><span class="style9">Celular: </span></td>
<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="celular" size="15">
</font></td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="Submit" value="Enviar">
<input type="reset" name="reset" value="Limpar">
</div></td>
</tr>
</table>
</form>
</body>
</html>

Espero ter ajudado !

Link para o comentário
Compartilhar em outros sites

  • 0

Fiz as alterações q o Rafael me falou no ASP e as alterações no HTML que o Jonathan me falou mas ainda ta dando pau , quando publico e clico no botão enviar sem os campos estarem preenchidos ele chama a pagina ASP e me da o erro 500 pagina não encontrada. e na relidade ela deveria me apresentar o erro que os campos não foram preenchidos certo. Segue os codigos modificados para vocês verem e se possivel me ajudarem

Obriagdo

MLM Designer

CODIGO HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	&lt;script language="JavaScript">

   var width = 550;
   var height = 550;

   var left = 100;
   var top = 100;

URL = "http://www.graciinfo.com.br/promocao.jpg";

   window.open(URL,'Natal', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=yes, fullscreen=no');
<head>
<title>Fomulario de Cadastro</title>
&lt;script type="text/javascript">
function Confirma() {
if (document.form1.nomerem.value=="") {
alert("O campo 'nome' não pode ficar em branco !")
return false
}else if (document.form1.emailrem.value=="") {
alert("Digite seu e-mail !")
return false
}else if(document.form1.empresa.value=="") {
alert("Digite o nome da empresa !")
return false
}
</script>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

	<title>GracIInfo Informática - A Sua Empresa Rumo ao Futuro.</title>
	<link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />

<style type="text/css">
<!--
body {
	background-color: #328CBE;
}
a:link {
	color: #057BB8;
}
.style1 {color: #000000}
a:visited {
	color: #057BB8;
}
a:hover {
	color: #057BB8;
}
a:active {
	color: #057BB8;
}
.style6 {
	font-size: 10px;
	font-weight: bold;
}
#apDiv1 {
	position:absolute;
	left:488px;
	top:64px;
	width:488px;
	height:434px;
	z-index:1;
}
.style8 {color: #057BB8}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style></head>

<body>
  <div id="wrapper">
    <div id="header"> </div>
    <div id="left">
      <div id="logo">
        <h1> </h1>
      </div>
      <div id="nav">
        <ul>
          <li class="important"><a href="index.html" class="style1">Home</a></li>
          <li><a href="empresa.html">A Empresa</a></li>
          <li><a href="servicos.html">Serviços</a></li>
          <li><a href="softwares.html">Softwares</a></li>
          <li><a href="localizacao.html">Localização</a></li>
          <li><a href="contato.html">Contato</a></li>
                 </ul>
      </div>
      <div id="news">
        <h2 align="left">Proteu - Sistema de Clínicas</h2> 
        <p align="left"><img src="images/proteu_left.jpg" alt="" width="153" height="86" /></p>
        <p class="more"><span class="style6"><a href="softwares.html">Saiba mais</a></span></p>
        <div class="hr-dots"> </div>
        <h3 align="left">Desenvolvimento e Soluções</h3> 
        <p align="left"><img src="images/oftalmologia_left.jpg" alt="" width="129" height="125" /></p>
        <p align="justify">Desenvolvemos soluções que visam aumentar a competitividade da sua   empresa com o que há de melhor nos campos médico-laboratorial e setor de   clínicas.<br />
        </p>
        <p class="more"><a href="desenvolvimento_solucoes.html" target="_parent">Saiba mais</a></p>
      </div>
      <div id="support">
        <p> </p>
      </div>
    </div>
    <div id="right">
      <h2>Faça seu cadastro e Baixe a Demonstração</h2>
      <div id="welcome">
       	<head>
		<title>Formulário de Contato</title>
		</head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body bgcolor="#FFFFFF" text="#000000">
<div align="center">
		<p class="style8">Formulario para Cadastro</p>
		<p class="style8">Faça o Cadastro que você será redirecionado para fazer o DownLoad. Obrigado.</p>
			<form method="post" enctype="multpart/formdata" name="form1" action="enviar.asp">
			<table width="47%" border="0" cellspacing="2" cellpadding="2">
			<tr>
			<td width="33%"><span class="style9">Nome: </span></td>
			<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
			<input type="text" name="nomerem" size="45">
			</font></td>
			</tr>
			<tr>
			<td width="33%"><span class="style9">E-mail: </span></td>
			<td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="emailrem" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Empresa: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="empresa" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Endereço: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="endereço" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Cidade: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="cidade" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">UF: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="uf" size="45">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Telefone: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="telefone" size="15">
            </font></td>
            </tr>
            <tr>
            <td width="33%"><span class="style9">Celular: </span></td>
            <td width="67%"><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" name="celular" size="15">
            </font></td>
            </tr>
            <tr>
            <td colspan="2">
            <div align="center">
            <input type="submit" name="Submit" value="Enviar">
            <input type="reset" name="reset" value="Limpar">
            </div></td>
            </tr>
            </table>
            </form>
		</div>
        <p align="justify"> </p>

      </div>
      <div id="profile">
        <div> 
		</div>
        <div class="clear"> </div>
        <p class="more"> </p>
      </div>
    </div>
    <div class="clear"> </div>
    <div id="spacer"> </div>
    <div id="footer">
      <div id="copyright">
        Copyright © 2008 GracIInfo Informática - Todos Direitos Reservados.      </div>
	  <div id="footerline"></div>
    </div>

  </div>
  &lt;script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
&lt;script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2567912-1");
pageTracker._trackPageview();
</script>
</body>
&lt;script type="text/javascript">   

/******************************************  
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)  
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code  
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use  

Clubepc.org  
******************************************/  
function openwindow(){   
window.open("autumn_effect.htm","","width=350,height=500")   
}   

//Configure below to change URL path to the snow image   
var snowsrc="6uscqjq.gif"  
// Configure below to change number of snow to render   
var no = 20;   
// Configure whether snow should disappear after x seconds (0=never):   
var hidesnowtime = 0;   
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")   
var snowdistance = "pageheight";   

///////////Stop Config//////////////////////////////////   

var ie4up = (document.all) ? 1 : 0;   
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;   

function iecompattest(){   
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body   
}   

var dx, xp, yp;    // coordinate and position variables   
var am, stx, sty;  // amplitude and step variables   
var i, doc_width = 800, doc_height = 600;   

if (ns6up) {   
doc_width = self.innerWidth;   
doc_height = self.innerHeight;   
} else if (ie4up) {   
doc_width = iecompattest().clientWidth;   
doc_height = iecompattest().clientHeight;   
}   

dx = new Array();   
xp = new Array();   
yp = new Array();   
am = new Array();   
stx = new Array();   
sty = new Array();   
snowsrc=(snowsrc.indexOf("clubepc.org")!=-1)? "snow.gif" : snowsrc   
for (i = 0; i < no; ++ i) {   
dx[i] = 0;                        // set coordinate variables   
xp[i] = Math.random()*(doc_width-50);  // set position variables   
yp[i] = Math.random()*doc_height;   
am[i] = Math.random()*20;         // set amplitude variables   
stx[i] = 0.02 + Math.random()/10; // set step variables   
sty[i] = 0.7 + Math.random();     // set step variables   
if (ie4up||ns6up) {   
if (i == 0) {   
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://www.clubepc.org\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");   
} else {   
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");   
}   
}   
}   

function snowIE_NS6() {  // IE and NS6 main animation function   
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;   
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;   
for (i = 0; i < no; ++ i) {  // iterate for every dot   
yp[i] += sty[i];   
if (yp[i] > doc_height-50) {   
xp[i] = Math.random()*(doc_width-am[i]-30);   
yp[i] = 0;   
stx[i] = 0.02 + Math.random()/10;   
sty[i] = 0.7 + Math.random();   
}   
dx[i] += stx[i];   
document.getElementById("dot"+i).style.top=yp[i]+"px";   
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";   
}   
snowtimer=setTimeout("snowIE_NS6()", 300);   
}   

function hidesnow(){   
if (window.snowtimer) clearTimeout(snowtimer)   
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"  
}   

if (ie4up||ns6up){   
snowIE_NS6();   
if (hidesnowtime>0)   
setTimeout("hidesnow()", hidesnowtime*1000)   
}   

</script> 
</html>
_______________________________________________________ CODIGO ASP
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")

    if nomerem = "" then
        response.write "Digite o Seu Nome."
        response.end
        elseif emailrem = "" then
        responsewrite "Digite seu E-mail!"
        response.end
        elseif emailrem = "" then
        responsewrite "Digite seu E-mail!"
        response.end
        elseif empresa = "" then
        responsewrite "Digite o Nome de Sua Empresa!"
        response.end
        elseif endereço = "" then
        responsewrite "Digite seu Endereço!"
        response.end
        elseif cidade = "" then
        responsewrite "Digite sua Cidade!"
        response.end
        elseif uf = "" then
        responsewrite "Digite seu Estado!"
        response.end
        elseif telefone = "" then
        responsewrite "Digite o número de seu Telefone!"
        response.end
        elseif celular = "" then
        responsewrite "Digite o número de seu Celular!"
        response.end
        elseif nomerem <> "" then
        Response.Redirect("obrigado.html?" & EmailFrom)
        response.end
        elseif emailrem <> "" then
        Response.Redirect("obrigado.html?" & EmailFrom)
        response.end
        elseif empresa <> "" then
        Response.Redirect("obrigado.html?" & EmailFrom)
        response.end
        elseif endereçom <> "" then
        Response.Redirect("obrigado.html?" & EmailFrom)
        response.end
        elseif cidade <> "" then
        Response.Redirect("obrigado.html?" & EmailFrom)
        response.end
        elseif uf <> "" then
        Response.Redirect("obrigado.html?" & EmailFrom)
        response.end
        elseif telefone <> "" then
        Response.Redirect("obrigado.html?" & EmailFrom)
        response.end
        elseif celular <> "" then
        Response.Redirect("obrigado.html?" & EmailFrom)
        response.end
    end if
    
    cdoConfig.Fields.Item(sch & "sendusing") = 2
    cdoConfig.Fields.Item(sch & "smtpauthenticate") = 1
    cdoConfig.Fields.Item(sch & "smtpserver") = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    cdoConfig.Fields.Item(sch & "smtpserverport") = 25
    cdoConfig.Fields.Item(sch & "smtpconnectiontimeout") = 30
    cdoConfig.Fields.Item(sch & "sendusername") = "XXXXXXXXXXXXXXXXXXXXXXX" 'conta@seu_dominio
    cdoConfig.Fields.Item(sch & "sendpassword") = "XXXXXXXXXXXXXXXX"
    cdoConfig.fields.update
    Set cdoMessage = Server.CreateObject("CDO.Message")
    Set cdoMessage.Configuration = cdoConfig

        cdoMessage.From = "formulario@graciinfo.com.br" 'ENDEREÇO DE E-MAIL QUE SERÁ EXIBIDO NO FROM DA MENSAGEM
        cdoMessage.To = "formulario@graciinfo.com.br" 'ex: conta@seu_dominio, conta@uol.com.br, conta@hotmail
        cdoMessage.Subject = "Formulario de Contato"

    strBody = "Dados" & vbCrLf & vbCrLf & _
    "Nome:"& Request("nomerem")& vbCrLf & _
    "E-Mail:"& Request("emailrem")& vbCrLf & _
    "Empresa:"& Request("empresa")& vbCrLf & _
    "Endereço:"& Request("endereço")& vbCrLf & _
    "Cidade:"& Request("cidade")& vbCrLf & _
    "UF:"& Request("uf")& vbCrLf & _
    "Telefone:"& Request("telefone")& vbCrLf & _
    "Celular:"& Request("celular")& vbCrLf & _

        strBody = strBody & "."
        cdoMessage.HTMLBody = strBody

    cdoMessage.Send

        Set cdoMessage = Nothing
        Set cdoConfig = Nothing

Response.Redirect("obrigado.html?" & EmailFrom)
%>

Link para o comentário
Compartilhar em outros sites

  • 0

Caros amigos e vizitantes, fiz as alterações levando em concideração oque o Jonatham me falou e não mudei o arquivo ASP original e ta funcionando corretamente a pessoa q entre no site para baixar a Demosntração do Programa vai ser obrigado preencher os Campos Nome até Telefone para entrar na outra página de download.

Obrigado ao Jonatham e principalmente ao Rafel, pois se ele não tivesse colocado o post onde deveria ser colocado nunca teria arrumado

Brigadaço povo

MLMDesigner

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...