Click to See Complete Forum and Search --> : Comments not emailing


gbryant
12-31-2002, 04:41 PM
In the email script there is a text area for comments. However when I submit the form comments never are mailed only the name and subject.

What am I missing?

George Bryant

khalidali63
12-31-2002, 04:50 PM
make sure you are submitting the form.

gbryant
12-31-2002, 05:01 PM
Originally posted by khalidali63
make sure you are submitting the form.

I should have been more clear. I mean after I submit.

khalidali63
12-31-2002, 05:15 PM
can you paste your code here?

gbryant
12-31-2002, 05:22 PM
OK here is the whole script and form
Yhanks
<HTML><HEAD>
<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
}
}
var blank = "";
return blank;
}
function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) +
((expires != null) ? "; expires=" + expires.toGMTString() : "")
+ "; path=/";
}
function setName() {
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
var prompt=i = document.Mail.name.value;
setCookie("name", i, expdate);
}
function getName() {
if(getCookie("name") != null) {
document.Mail.Name.value = getCookie("emailname");
}
}
function getInfo() {
var now= new Date();
document.Mail.Info.value = "Browser: " + navigator.userAgent;
document.Mail.Info.value += "Date:" + now;
}
function checkMultiple() {
if (getCookie("emailsent") == 'true') return true;
else return false;
}
function process() {
setCookie("emailsent", "true");
with (document.Mail) {
if (Subject.selectedIndex == 1) action = "mailto:ceo@hhministry.com?subject= Comment - Please type in body of text";
else if (Subject.selectedIndex == 2) action = "mailto:acroman@aol.com?subject= Question";
else if (Subject.selectedIndex == 3) action = "mailto:ceo@hhministry.com?subject= Webmaster";

}
}
function formCheck() {
var passed = false;
with (document.Mail) {
if (Subject.selectedIndex == 0) {
alert("Please pick a subject.");
Subject.focus();
}
else if (Name.value == "") {
alert("Please inlcude your name.");
Name.focus();
}
else if (checkMultiple()) {
if (confirm("You just sent an e-mail from this form, are you sure you want to send another?")) {
process();
passed = true;
}
}
else {
process();
passed = true;
}
}
return passed;
}
// End -->
</SCRIPT>

<BODY><CENTER>
<FONT FACE = "Times" SIZE = 3>
Any thing you would like to tell us? Any comments, suggestions, or questions?
<BR>
<DD>
If you are using Internet Explorer or would rather mail directly, then click <A HREF = "mailto:acroman@aol.com?subject=TJS - Mail">here</A>.
</DD>
<BR>
<FORM NAME = "Mail" ACTION = "mailto:acroman@aol.com?subject=TJS - Form" METHOD = "POST" ENCTYPE = "text/plain" onSubmit="return formCheck();">
<INPUT TYPE = "hidden" SIZE = 0 NAME = "Info">
<TABLE BORDER = 0 CELLPADDING = 10 CELLSPACING = 0>
<TR><TD>
Name:
<INPUT TYPE = "text" NAME = "Name" onChange = "setName()">
</TD><TD ALIGN = RIGHT >
Subject:
<SELECT NAME = "Subject">
<OPTION SELECT>Please Select A Subject</OPTION>
<OPTION>1. Comment</OPTION>
<OPTION>2. Question</OPTION>
<OPTION>3. Webmaster</OPTION>

</SELECT>
</TD></TR>

<TR>
<TD COLSPAN = 2>
Comments or questions. :
<BR><BR>
<TEXTAREA NAME = "Comments, Suggestions" COLS = 50 ROWS = 6>
</TEXTAREA>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

khalidali63
12-31-2002, 05:42 PM
li' problems in your process and formCheck functions.they are fixed..


below is the whole pages code Updated


<html>
<head>
<script type="text/javascript" language="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
}
}
var blank = "";
return blank;
}
function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) +
((expires != null) ? "; expires=" + expires.toGMTString() : "")
+ "; path=/";
}
function setName() {
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
var prompt=i = document.Mail.name.value;
setCookie("name", i, expdate);
}
function getName() {
if(getCookie("name") != null) {
document.Mail.Name.value = getCookie("emailname");
}
}
function getInfo() {
var now= new Date();
document.Mail.Info.value = "Browser: " + navigator.userAgent;
document.Mail.Info.value += "Date:" + now;
}
function checkMultiple() {
if (getCookie("emailsent") == 'true') return true;
else return false;
}
function process() {
setCookie("emailsent", "true");
with (document.Mail) {
if (Subject.selectedIndex == 1){
document.Mail.action = "mailto:k_ali@shaw.ca?subject= Comment - Please type in body of text";
}else if (Subject.selectedIndex == 2) {
document.Mail.action = "mailto:k_ali@shaw.ca?subject= Question";
}else if (Subject.selectedIndex == 3) {
document.Mail.action = "mailto:k_ali@shaw.ca?subject= Webmaster";
}
}
}
function formCheck() {
var passed = false;
with (document.Mail) {
if (Subject.selectedIndex == 0) {
alert("Please pick a subject.");
Subject.focus();
}else if (Name.value == "") {
alert("Please inlcude your name.");
Name.focus();
}else if (checkMultiple()) {
if (confirm("You just sent an e-mail from this form, are you sure you want to send another?")) {
process();
passed = true;
}
}else {
process();
passed = true;
}
}
return passed;
}
// End -->
</script>
<title>
</title>
</head>
<body>
<center>
<font face="Times" size="3">Any thing you would like to tell us? Any
comments, suggestions, or questions?<br>
</font>
<dl>
<dd>
<font face="Times" size="3">If you are using Internet Explorer
or would rather mail directly, then click <a href=
"mailto:acroman@aol.com?subject=TJS - Mail">here</a>.</font>
</dd>
<dd>
<font face="Times" size="3"><br>
</font>
<form name="Mail" action="mailto:k_ali@shaw.ca?subject=TJS - Form" method="POST" enctype="text/plain" onsubmit="return formCheck();">
<font face="Times" size="3"><input type="hidden" size="0" name="Info"></font>
<table border="0" cellpadding="10" cellspacing="0">
<tr>
<td>
Name: <input type="text" name="Name" onchange="setName()">
</td>
<td align="RIGHT">
Subject: <select name="Subject">
<option select="">
Please Select A Subject
</option>
<option>
1. Comment
</option>
<option>
2. Question
</option>
<option>
3. Webmaster
</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
Comments or questions. :<br>
<br>
<textarea name="Comments, Suggestions" cols="50"
rows="6">
</textarea> <br>
<input type="Submit"></input>
</td>
</tr>
</table>
</form>
</dd>
</dl>
</center>
</body>
</html>

gbryant
12-31-2002, 06:56 PM
I guess I am missing something.

I made the changes and still the same results.

Why the comments won't post is a mystery to me. My emasil editor is opening up, the subject and name is there but no comments.

I really appreciate all the time you are spending to help me.

George Bryant

gbryant
12-31-2002, 07:00 PM
I'm not sure if this is one of your scripts or not but the problem I am having with this one is the $lib path
Here is a part of the script. It is of course a cgi script.

Thought you may know something about it.


#!/usr/local/bin/perl
$lib="/library/emailformreturn.cgi"; # Default path for loading libraries
require "$lib/cgi-lib.pl";
$mailProgram = '/usr/sbin/sendmail';

# Email id to send the email to
$emailId = 'ceo@hhministry.com';

#################################################################################
#
# Email Form Return V1.0 by TechnoSpring Software
#
# No part of this script can be resold or redistributed without prior consent.
# You can use it in your site as you need it.
# Do not remove this copyright notice
# Add a link to http://www.dreamcatchersweb.com/
#
# (c)2001-2002 TechnoSpring Software
# Websites :
# http://www.ProjectSpring.com
# http://www.TheCentralMall.com
# http://www.DreamCatchersWeb.com
# http://www.TechnoSpring.com
#
# Please read the license for more information
#
#################################################################################
#
# Instructions
# - Copy emailformreturn.cgi to your cgi directory and update path in emailform.html fi

khalidali63
12-31-2002, 07:10 PM
That is perl or some othr lang I am not familiar with.I used the script to send email to me using my default mail client MS Outlook
I 'll use the same code to send you the mail message you should get it in few mins.
if you get the mail, then there is certainly something wrong with the mail script on your machine

khalidali63
12-31-2002, 07:11 PM
lol...whats ur email address..I guess I need that

gbryant
12-31-2002, 07:18 PM
ceo@hhministry.com

khalidali63
12-31-2002, 07:33 PM
just sent u an email..

gbryant
12-31-2002, 07:50 PM
I sent you a reply from my email editor

khalidali63
12-31-2002, 08:04 PM
I have recieved it the way it should be,
Now what is that still remains to be seen?

Khalid