Set up a feedback form on your
site in under 5 minutes. Let your visitors send you email from a
popup form that uses asp and CDONTS or JMAIL. Just insert your email
address into the asp page that invokes the mail, and set the font
and colors to match your site and you are done.
Place this where you want the hyperlink to appear.
<script>
function openit(){
var which="feedback.htm"
whichit=window.open(which,"","width=400,height=255")
}
</script>
<a href="javascript:openit()">Contact Us</a>
Name this page feedback.htm. place it in the same directory as the page with the link.
<html>
<head>
<title>Tell Us</title><script language="javascript">function invalid() {
if (document.email.T1.value.length < 2) {
alert("Please enter your name");
return false;
}
if (document.email.T2.value.length < 6) {
alert("Please enter your email");
return false;
}
if (document.email.S1.value.length < 2) {
alert("You left the message blank");
return false;
}
return true;
}
</script>
</head>
<body>
<center>
<form name="email" method="POST" action="feedback.asp" onSubmit="return invalid();">
<p>Name:<br><input type="text" name="T1" size="31"><br>
Email:<br><input type="text" name="T2" size="31"><br>
Comments:<br><textarea rows="5" name="S1" cols="43"></textarea><br>
<input type="submit" value="Tell Us Now!" name="B1"></p>
</form>
</center>
</body>
</html>
If you are using CDONTS, use this page here. Name it feedback.asp. Place it in the same directory as the others.
<%Response.Buffer=True%>
<html>
<head>
<title>Thanks</title><%
Dim t1name,t1,t2name,t2
t1name = "name"
t1 = Request.Form("t1")
t2name = "email"
t2 = Request.Form("t2")
Dim stname,st
stname = "comments"
st = Request.Form("s1")
Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
'CHANGE THE EMAIL ADDRESS IN QUOTES BELOW TO THE ADDRESS YOU WANT THIS MAIL SENT
ObjMail.To = "me@me.com"
ObjMail.From = t2
ObjMail.Subject = "Feedback"
ObjMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
t2name & vbcrlf&_
t2 & vbcrlf&_
stname & vbcrlf&_
st
ObjMail.Send
Set ObjMail = Nothing
Response.Write"<center />Thank You. <br>This window will self destruct in 10 seconds..."
%>
<script language="javascript"><!--
var timer = null
function closeWin() {
self.close()
}
//-->
</script>
</head>
<body onLoad="timer=setTimeout('closeWin()',8000)"><form>
<input type="button" value="EXIT" onClick="window.close()"></form>
</body>
</html>
If you are using JMAIL, use this page here. Name it feedback.asp. Place it in the same directory as the others.
<%Response.Buffer=True%>
<html>
<head>
<title>Thanks</title><%
Dim t1name,t1,t2name,t2
t1name = "name"
t1 = Request.Form("t1")
t2name = "email"
t2 = Request.Form("t2")
Dim stname,st
stname = "comments"
st = Request.Form("s1")
Dim JMail
Set JMail = Server.CreateObject("JMail.SMTPMail")
'Change this line to the address of your email server.
'Something like this: mail.yoursite.com:25
JMail.ServerAddress = "mail.server:25"
JMail.AddRecipient "me@me.com"
'CHANGE THE EMAIL ADDRESS IN QUOTES BELOW TO THE ADDRESS YOU WANT THIS MAIL SENT
JMail.Sender = t2
JMail.Subject = "Feedback"
JMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
t2name & vbcrlf&_
t2 & vbcrlf&_
stname & vbcrlf&_
st
JMail.Execute
Set JMail = Nothing
Response.Write"<center />Thank You. <br>This window will self destruct in 10 seconds..."
%>
<script language="javascript"><!--
var timer = null
function closeWin() {
self.close()
}
//-->
</script>
</head>
<body onLoad="timer=setTimeout('closeWin()',8000)"><form>
<input type="button" value="EXIT" onClick="window.close()"></form>
</body>
</html>