Click to See Complete Forum and Search --> : mailing list script doesn't send data


dorocky
08-07-2003, 08:53 AM
I copied the mailing list script onto to my web page. When I send the email msg the msg is blank except for the subject. The firstname, lastname, address, city,state,zip code doesn't appear in the sent msg. The field validation doesn't work either. I don't get any msg if a ffield is left blank, even the email field.

Here is my code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!-- InstanceBegin template="/Templates/newpage.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free

online at -->
<!-- The JavaScript Source!!

http://javascript.internet.com -->

<!-- Begin
function resetform() {
document.forms[0].elements[1]=="";
}
function submitForms() {
if (isEmail() && isFname() && isLname() &&

isAddress() && isCity() && isState() && isZip())
if (confirm("\n You are about to e-mail your

submission. \n\nYES to submit. NO to abort."))
{
alert("\nYour submission will now be sent. \n\n Use

the Return Button once the submission is complete

to return to my home page.\n\n\n Thank you for

joining our mailing list!");
return true;
}
else
{
alert("\n You have chosen to abort the

submission.");
return false
}
else
return false;
}
function isEmail() {
if (document.forms[0].elements[1].value == "") {
alert ("\n The E-Mail field is blank. \n\n Please

enter your E-Mail address.")
document.forms[0].elements[1].focus();
return false;
}
if (document.forms[0].elements[1].value.indexOf

('@',0) == -1 ||
document.forms[0].elements[1].value.indexOf ('.',0)

== -1) {
alert ("\n The E-Mail field requires a \"@\" and a

\".\"be used. \n\nPlease re-enter your E-Mail

address.")
document.forms[0].elements[1].select();
document.forms[0].elements[1].focus();
return false;
}
return true;
}
function isFname() {
if (document.forms[0].elements[2].value == "")
{
alert ("\n The First Name field is blank. \n\n

Please enter your first name.")
document.forms[0].elements[2].focus();
return false;
}
return true;
}
function isLname() {
if (document.forms[0].elements[3].value == "") {
alert ("\n The Last Name field is blank. \n\nPlease

enter your last name.")
document.forms[0].elements[3].focus();
return false;
}
return true;
}
function isAddress() {
if (document.forms[0].elements[4].value == "") {
alert ("\n The Address field is blank. \n\nPlease

enter your address.")
document.forms[0].elements[4].focus();
return false;
}
return true;
}
function isCity()
{
if (document.forms[0].elements[5].value == "")
{
alert ("\n The City field is blank. \n\nPlease

enter your city.")
document.forms[0].elements[5].focus();
return false;
}
return true;
}
function isState() {
if (document.forms[0].elements[6].value == "") {
alert ("\n The state field is blank.\n\nPlease

enter your state.")
document.forms[0].elements[6].focus();
return false;
}
return true;
}
function isZip() {
if (document.forms[0].elements[7].value == "") {
alert ("\n The Zip code field is blank. \n\nPlease

enter your Zip code.")
document.forms[0].elements[7].focus();
return false;
}
return true;
}
// End -->
</SCRIPT>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Janette Dickinson, Realtor</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="author" content="Debbye Rocheleau, CIW associate"></meta>
<meta name="description" content="Janette Dickinson is a Real Estate and Relocation Specialist for North Carolina including Raleigh and surrounding area including Cary, Apex, Durham, Chapel Hill and the Research Triangle ."><meta>
<meta name="keywords" content="corporate relocation, relocate, realtor, North Carolina, NC, RTP, Research Triangle, homes, property, sellers, buyers, homes for sale"></meta>
<meta name="distribution" content="Global"></meta>
<meta name="robots" content="index,follow"></meta>
<meta name="rating" content="general"></meta>
<meta http-equiv="Cache-Control" content="no-cache">
<!--Link to external style-sheet-->
<link href="../css/newpage.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
p {
text-align: center;
}
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body>
<div class="banner">
<h1>Janette Dickinson</h1>
<h2>SERVING ALL YOUR REAL ESTATE &amp RELOCATION NEEDS</h2>
</div>
<!-- InstanceBeginEditable name="picregion" -->
<div class="leftpics">
<p class="centercontent">&nbsp;</p>
</div>
<div class="centerpics">
<h3><b>
</b>PAGE<br>TITLE</h3>
</div>
<div class="rightpics">
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<!-- InstanceEndEditable -->
<div class="nav"> <a href="../index.html" target="newpage">HOME</a>
<p></p>
<a href="relocate.html" target="newpage"> CORPORTE RELOCATION </a>
<p></p>
<a href="listings.html" target="newpage"> VIEW MY LISTINGS </a>
<p></p>
<a href="schools.html" target="schools"> SCHOOLS </a>
<p></p>
<a href="code/community.htm" target="newpage"> COMMUNITY INFORAMTION </a>
<p></p>
<a href="sellers.html" target="newpage"> HOME SELLER'S GUIDE </a>
<p></p>
<a href="buyers.html" target="newpage"> HOME BUYER'S GUIDE </a>
<p></p>
<a href="arealist.html" target="newpage">SEARCH AREA LISTINGS</a>
<p></p>
<a href="meetjan.htm" target="newpage">MEET JANETTE</a>
<p></p>
<a href="newsltr.htm" target="newpage">FREE NEWSLETTER</a>
<p></p>
<a href="mortgage.html" target="newpage">MORTGAGE REPORT</a>
<p></p>
<a href="contact.html" target="newpage">CONTACT ME</a> </div>

<!-- InstanceBeginEditable name="bodyregion" -->
<div class="centercontent" >
<h3 style="text-align:center;">REQUEST FREE NEWSLETTER</h3>
<FORM enctype="text/plain" name="addform" method='get'
action='mailto:jsdickinson@mindspring.com' onSubmit="return submitForms()">
<input type=hidden name=subject value="Request Free Newsletter">
<p style="text-align:left;"><b>E-Mail Address:<input type="text/css" SIZE="35,1" maxlength="80" NAME="Email Address"></b></p>
<p style="padding-left: 23px; text-align:left;"><b>First Name:<input type="text/css" SIZE="35,1" maxlength="80" NAME="First Name"></b></p>
<p style="padding-left: 25px; text-align:left;"><b>Last Name:<input type="text/css" SIZE="35,1" maxlength="80" NAME="Last Name"></b></p>
<p style="padding-left: 39px; text-align:left;"><b>Address:<input type="text/css" SIZE="35,1" maxlength="80" NAME="Address"></b></p>
<p style="padding-left: 64px;text-align:left;"><b>City:<input type="text/css" size="35,1" maxlength="80" NAME="City"></b></p>
<p style="padding-left:55px;text-align:left;"><b>State:<input type="text/css" size="10,1" maxlength="25" NAME="State"></b></p>
<p style="padding-left: 37px;text-align:left;"><b>Zip Code:<input type="text/css" SIZE="20,1" maxlength="35" "name="Zip"></b></p>
<br>
<input type="submit" value=" Submit ">
<input type="button" value=" Return "

onclick="window.location='your-page.html'">
<input type="reset" value="Reset Form"

onclick=resetform()>
</form>
</div>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>