|
Adding a Submit button so info is emailed to me - HTML Help
Below is the current code I have. I havent coded in html for 6 years. Can someone either add or show me how to add a submit button that emails the info on that page to my email. I have been asked by a friend to build him a website, and right now I am a total faliure. I also need a reset button on the site that clears the info in the boxes. If someone could either just do it for me, or show me how i'd really apreciate it. Thanks everyone.
Mike
<html>
<head>
<title>Player Signup</title>
<script>
window.windowname= "Add Form Page"
orpage= window.windowname
function startForm(form) {
nname= form.fname.value;
nname= ((nname== "") ? nname= "" : nname= " NAME=" + nname);
ntarget= form.ftarget.value;
ntarget= ((ntarget== "") ? ntarget= "" : ntarget= " TARGET=" + ntarget);
nenctype= form.fenctype.value;
nenctype= ((nenctype== "") ? nenctype= "" : nenctype= " ENCTYPE=" + nenctype);
whtml= form.HTML.value;
mymethods= form.chosenmethod.selectedIndex;
mymethodsarray= new Array();
mymethodsarray[0] = "";
mymethodsarray[1] = "GET";
mymethodsarray[2] = "POST";
mymethod= mymethodsarray[mymethods];
mymethod= ((mymethod== "") ? mymethod= "" : mymethod= " METHOD=" + mymethod);
myaction= form.chosenaction.value;
myaction= ((myaction== "") ? myaction= "" : myaction= " METHOD=\"" + myaction + "\"");
nhtml= whtml + "\r <FORM" + nname + myaction + mymethod + ntarget + nenctype + ">";
form.HTML.value = nhtml;
}
function endForm(form) {
whtml= form.HTML.value;
nhtml= whtml + "\r </FORM>";
form.HTML.value = nhtml;
}
function newItem(txtarea, form) {
addbre= (form.addbr.checked== true) ? addbre=form.addbr.value : addbre= "";
crows= form.chooserows.value;
ccols= form.choosecols.value;
crows= ((crows== "") ? crows= "" : crows= " ROWS=" + crows);
ccols= ((ccols== "") ? ccols= "" : ccols= " COLS=" + ccols);
ntoit= form.choosevalue.value;
cname= form.choosename.value;
cname= ((cname== "") ? cname= "" : cname= " NAME=\"" + cname + "\"");
ctype= form.choosetype.selectedIndex;
ctypearray= new Array();
ctypearray[0] = "text";
ctypearray[1] = "radio";
ctypearray[2] = "checkbox";
ctypearray[3] = "button";
ctypearray[4] = "hidden";
ctypearray[5] = "reset";
ctypearray[6] = "submit";
ctypearray[7] = "password";
ntoit= ((0 < ctype) ? ntoit= ntoit : ntoit= "");
ntoit= ((ctype > 2) ? ntoit= "" : ntoit= ntoit);
check= form.checks.value
checktf= form.checks.checked
check= ((ctype== 2) | (ctype== 1) ? check= check : check= "")
check= (checktf== true) ? check= check : check= "";
cvalue= form.choosevalue.value;
cvalue= ((cvalue== "") ? cvalue= "" : cvalue= " VALUE=\"" + cvalue + "\"");
csize= form.choosesize.value;
csize= ((ctype== 7) | (ctype== 0) ? csize= csize : csize= "")
csize= ((csize== "") ? csize= "" : csize= " SIZE=" + csize);
clength= form.chooselength.value;
clength= ((clength== "") ? clength= "" : clength= " MAXLENGTH=" + clength);
clength= ((ctype > 0) ? clength="" : clength= clength);
whtml= form.HTML.value;
ctype= " TYPE=\"" + ctypearray[ctype] + "\"";
nhtml= whtml + "\r <INPUT" + check + cname + ctype + cvalue + csize + clength + ">" + ntoit + addbre;
txtdsply= "Default Text"
nwhtml= whtml + "\r <TEXTAREA" + cname + crows + ccols + ">" + txtdsply + "</TEXTAREA>" + addbre;
nhtml= ((txtarea== 8) ? nhtml= nwhtml : nhtml= nhtml);
form.HTML.value = nhtml;
}
function genNewPage(form) {
header= "<HTML>\r<HEAD>\r<TITLE>Generated Form</TITLE>\r</HEAD>\r\r<BODY BGCOLOR=\"white\">";
newhtml= form.HTML.value;
footer= "</BODY>\r</HTML>";
newpage= header + "\r\r" + newhtml + "\r\r" + footer;
preWin= open("", "Preview", "width=400,height=400,status=no,toolbar=no,menubar=no");
preWin.document.open();
preWin.document.write(newpage);
preWin.document.close();
}
</script>
<base target="leftframe">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body {
background-image: url(backgroundice.jpg);
}
-->
</style></head>
<body BGCOLOR="#ffffff" link="#CC0033" vlink="#333399" alink="#FF0000" <!--content start-->
<p align="center"><a href="home.html" ><img src="home.jpg" width="182" height="56" /></a><a href="dates.html"><img src="dates.jpg" width="182" height="56" /></a><a href="registration.html"><img src="register.jpg" width="182" height="56" /></a><a href="about.html"><img src="aboutus.jpg" width="182" height="56" /></a><a href="yourprogram.html"/a><img src="camps.jpg" width="182" height="56" /></a></p>
<table WIDTH="96%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
<tr>
<td WIDTH="100%"><form NAME="addform">
<p>Player Information</p>
<p>Name: <input NAME="pname" TYPE="text" size="20"><br>
Age:
<input TYPE="text" NAME="age" size="20"><br>
Last Team:
<input TYPE="text" NAME="lteam" size="20">
<br>
Level Played At (A1,A2,A3,C):
<input TYPE="text" NAME="level" size="20">
<br>
Stats:
<input type = "text" NAME="stats" size="20"><br>
Email:
<input TYPE="text" NAME="email" size="20">
<BR>
Home Phone:
<input TYPE="text" NAME="homephone" size="20">
<BR>
Cell Phone:
<input TYPE="text" NAME="cellphone" size="20">
<BR>
City of residence:
<input TYPE="text" NAME="city" size="20">
<BR>
Home orginization:
<input TYPE="text" NAME="orginization" size="20">
<BR>
What are your goals for the Upcoming Hockey Season?
<p>
<textarea NAME="sgoals" ROWS="10" COLS="45"></textarea>
<p>Who Refered you to us?
<input TYPE="text" NAME="referl" size="20">
<p>What are you hockey aspirations for the future?
<p>
<textarea NAME="hgoals" ROWS="10" COLS="45"></textarea>
<p>How Will you be paying? (Money order, Check preferred, Paypal also Avalible. Do NOT mail an envelope full of cash!)</p>
<p>
<input TYPE="text" NAME="paytype" size="20">
</p>
<p> </p>
<p>
</form>
</td>
</tr>
</table>
<!--content stop-->
</body>
</html>
|