/    Sign up×
Community /Pin to ProfileBookmark

Mailing List from this site

I’ve copied the code and modified it to have the e-mail go to my e-mail address. However, after filling out the form on a HTML document, Outlook goes to create a new e-mail, but nothing is put into it. Any input from others?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 29.2008 — Show the code you use.
Copy linkTweet thisAlerts:
@MeechDawgauthorMay 29.2008 — <HTML>

<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())

}

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;

}

// End -->

</SCRIPT>

</HEAD><BODY>

<CENTER>

<FORM enctype="text/plain" name="addform" method='get'

action='mailto:myemailaddress' onSubmit="return submitForms()">

<TABLE border=3 width=430 cellpadding=10><TD align="center">

<strong>

<font face="arial" size=+2>Join the Mailing List!</font>

</strong>

</TABLE>

<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></TABLE>

<br>

<center>

<input type="submit" value=" Submit ">

<input type="button" value=" Return " onclick="window.location='MailingList.html'">

<input type="reset" value="Reset Form" onclick=resetform()>

</FORM>

</CENTER>

</BODY></HTML>
Copy linkTweet thisAlerts:
@FangMay 29.2008 — Change [I]method[/I] to [I]post[/I]
×

Success!

Help @MeechDawg 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.25,
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,
)...