/    Sign up×
Community /Pin to ProfileBookmark

Javascript help – not sending email automatically

I have added some Java script to a page I am working on. My ISP does not allow CGI scripting, so I am trying to get around this in a simple way, and I came across this code at your site. I have added it to the page I am working on, and the problems are:
1. It only wants to jump to my email protocol program (Eudora) and set up an automatic outbound email to be sent, which then needs to hit SEND to make it go. However, that is worthless, since none of the filled out fields from the form have been added to this email, so nothing viable like the contact information would ever get to me. It is like a blank email with the recipient and the sender filled in, but nothing else
2. The completed fields are simple enough, but rather than create a separate email that they have to click to submit, which from many computers they may not have the ability to do, my preference is to simply have this form, once completed and they hit the SUBMIT button, automatically be sent to my inbound email automatically – simple, easy, no hassles and it works.
I hope this is something simple, and maybe because COX does not allow CGI functions on regular home pages, this won’t work, but I sure can’t believe there isn’t some simple work around to make this function send me the contact information to my inbound email box. PLEASE HELP ME OUT.
Can you assist. Here is the source code for the whole page:
<HTML><HEAD><TITLE>MIKE REISMAN – REISMAN, LTD. – Your First USA Real Estate Consultant</TITLE>
<META NAME=”author” CONTENT=”Michael Reisman”>
<META NAME=”description” CONTENT=”Consulting firm for real estate sales and purchases, along with development, remodeling, design, furnishing, management, marketing, investing, with personal attention and quality as the essence”>
<META NAME=”keywords” CONTENT=”real, realty, realtor, estate, property, home, house, land, buy, sell, agent, broker, buyer, seller, mortgage, finance, Keller Williams, Scottsdale, Arizona, Phoenix, Tempe, Mesa, Chandler, Glendale, Peoria, Sun City, Carefree, Cavecreek, Desert Mountain, Paradise Valley”></HEAD>
<meta name=”Microsoft Theme” content=”none”></head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<body bgcolor=”#80FF80″ text=”#000000″ link=”#0000EE” vlink=”#551A8B” alink=”#FF0000″>
<SCRIPT LANGUAGE=”JavaScript”>
<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>
<!– Begin
function resetform() {
document.forms[0].elements[1]==””;
}
function submitForms() {
if (isEmail() && isFname() && isLname() && isAddress() && isCity() && isState() && isZip() && isPhoneNumber())
if (confirm(“n You are about to e-mail your submission. nnYES to submit. NO to abort.”))
{
alert(“nYour submission will now be sent. nn Use the Return Button once the submission is complete to return to my home page.nnn Thank you for contacting us. We will contact you shortly.”);
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. nn 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. nnPlease 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. nn 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. nnPlease 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. nnPlease 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. nnPlease 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.nnPlease 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. nnPlease enter your Zip code.”)
document.forms[0].elements[7].focus();
return false;
}
return true;
}
function isPhoneNumber() {
if (document.forms[0].elements[8].value == “”) {
alert (“n The Phone Number field is blank. nnPlease enter your Phone Number.”)
document.forms[0].elements[8].focus();
return false;
}
return true;
}
// End –>
</SCRIPT>
</head>

<body>
<CENTER>
<FORM enctype=”text/plain” name=”addform” method=’get’
action=’mailto:[email protected]?subject=TJS – Mailing List’ onSubmit=”return submitForms()”>
<TABLE border=3 width=430 cellpadding=10><TD align=”center”>
<strong>
<font face=”arial” size=+2>GETTING IN TOUCH WITH US</font>
</strong>
</TABLE><br>
<input type=”hidden” name=”Form” value=”Submit Sub”>
<TABLE border=3 cellspacing=0 cellpadding=2 bgcolor=”#C0C0C0″>
<tr valign=baseline>
<TD>
<font face=”arial”>Email Address:</font>
</TD>
<TD>
<input type=text name=”Email Address” size=35,1 maxlength=80>
</TD>
</tr>
<tr>
<TD>
<font face=”arial”>First Name:</font>
</TD>
<TD>
<input type=text name=”First Name” size=35,1 maxlength=80>
</TD></tr>
<tr>
<TD>
<font face=”arial”>Last Name:</font>
</TD>
<TD>
<input type=text name=”Last Name” size=35,1 maxlength=80>
</TD></tr>
<tr>
<TD>
<font face=”arial”>Address:</font>
</TD>
<TD>
<input type=text name=”Address” size=35,1 maxlength=80>
</TD></tr>
<tr>
<TD>
<font face=”arial”>City:</font>
</TD>
<TD>
<input type=text name=”City” size=35,1 maxlength=80>
</TD></tr>
<tr>
<TD>
<font face=”arial”>State:</font>
</TD>
<TD>
<input type=text name=”State” size=10,1 maxlength=25>
</TD></tr>
<tr>
<TD>
<font face=”arial”>Zip Code:</font>
</TD>
<TD>
<input type=text name=”Zip” size=20,1 maxlength=35>
</TD></tr>
<tr>
<TD>
<font face=”arial”>Phone Number:</font>
</TD>
<TD>
<input type=text name=”Phone NUmber” size=25,1 maxlength=60>
</TD></tr>
<tr>
<TD>
<font face=”arial”>Comments:</font>
</TD>
<TD>
<input type=text name=”Comments” size=90,2 maxlength=120>
</TD></tr></TABLE>
<br></center>
<center>
<input type=”submit” value=” Submit “>
<input type=”button” value=” Return ” onclick=”window.location=’index.html'”>
<input type=”reset” value=”Reset Form” onclick=resetform()>
</FORM>
</CENTER><br>
<tr>
<td valign=”top” width=”760″><!– InstanceBeginEditable name=”body” –>
<div
style=”font-size: 16px; font-family: Verdana,Arial,Helvetica,sans-serif;”
align=”left”><font color=purple><b>
<p align=”left”>Services Mike Reisman performs:</div>
<div
style=”font-size: 14px; font-family: Verdana,Arial,Helvetica,sans-serif;”
align=”left”>
<blockquote>
Real Estate<br>
Purchase<br>
Rental<br>
Investment<br>
Mangagment<br>
Remodeling or Design<br>
<blockquote>
<p>You can also contact us via:</p>
<blockquote>
(480) 488-4933 (Phone)<br>
(480) 694-4808 (Cell Phone)<br><br></p>
Mike Reisman<br>
Reisman LTD<br>
37697 N. 94th Street<br>
Scottsdale, Arizona 85262-2539 </p>
</blockquote>
</blockquote>
</blockquote>
</b></font></div>
</td>
</tr>
</body>
</html>
Thank you so very much for your expertise and personal attention.Mike

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@d3ikJul 24.2005 — Well Mike, the problem is that in order to send mail at some point you have to talk to a mail server and Javascript is purely a client side language. Sending mail is a purely server side action, for instance when you send mail via Outlook or whatever mail client you use you're actually sending a message to your ISP's mail server (Cox) who then handles the message and forward it onto who you'd like to receive it. Now Outlook handles this mail server interaction automatically obviously, and there are several server side solutions that can accomplish this as well, but if Cox doesn't allow you any type of scripting language on the server side there isn't a whole lot that Javascript can do for you. Sorry I come bearing bad news, but if you're interested in accomplishing this type of thing there are several hosting services that are very reasonable ($40/year) that allow you many scripting and database options. Good luck.
×

Success!

Help @reisman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...