Page 1 of 2
<html>
<head>
<title>Student Registration Form</title>
<script type="text/javascript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
function confirmReset() {
var resetForm = confirm("This will clear the form information. Are you sure?");
if (resetForm == true)
return true;
return false;
}
function nextForm() {
document.cookie = encodeURI("lastname=" + document.forms[0].lastname.value);
document.cookie = encodeURI("&firstname=" + document.forms[0].firstname.value);
document.cookie = encodeURI("&ssn=" + document.forms[0].ssn.value);
document.cookie = encodeURI("&birthdate=" + document.forms[0].birthdate.value);
document.cookie = encodeURI("&address=" + document.forms[0].address.value);
document.cookie = encodeURI("&city=" + document.forms[0].city.value);
document.cookie = encodeURI("&state=" + document.forms[0].state.value);
document.cookie = encodeURI("&zip=" + document.forms[0].zip.value);
document.cookie = encodeURI("&pgname1=" + document.forms[0].pgname1.value);
document.cookie = encodeURI("&pgname2=" + document.forms[0].pgname2.value);
document.cookie = encodeURI("&econtact=" + document.forms[0].econtact.value);
document.cookie = encodeURI("&ephone=" + document.forms[0].ephone.value);
document.cookie = encodeURI("&erelation=" + document.forms[0].erelation.value);
for (var t=0; t<document.forms[0].transportation.length; ++t) {
if (document.forms[0].transportation[t].checked == true)
document.cookie = encodeURI("&transportation="
+ document.forms[0].transportation[t].value);
}
document.cookie = encodeURI("&comments=" + document.forms[0].comments.value);
location.href="StudentReg.html";
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</script>
</head>
<body bgcolor="#cccccc">
<h2><img src="contract.png"> UOP High School - Student Registration Form</h2>
<form action=""method="get" enctype="application/x-www-form-urlencoded" onreset="return confirmReset();">
<hr><b>Student Information:</b><hr>
<p>
Last Name <input type="text" name="lastname" />
First Name <input type="text" name="firstname" />
Social Security No. <input type="password" name="ssn" maxlength="9" />
Birth Date <input type="text" name="birthdate" value="mm/dd/yyyy" />
</p>
<p>
Street Address <input type="text" name="address" size="35" />
City <input type="text" name="city" />
State <input type="text"name="state" size="2" maxlength="2" />
Zip Code <input type="text" name="zip" size="5" maxlength="5" />
</p>
<hr><b>Family Information:</b><hr>
<p>
Parent/Guardian Name <input type="text" name="pgname1" size="25" />
Parent/Guardian Name <input type="text" name="pgname2" size="25" />
</p>
<hr><b>Emergency Contact</b> (If the parent(s) cannot be contacted):<hr>
<p>
Name <input type="text" name="econtact" size="25">
Phone Number <input type="text" name="ephone" size="13" value="(xxx)xxx-xxxx"> Relationship <input type="text" name="erelation" size="15">
Transportation? <input type="radio" name="transportation" value="yes">Yes
<input type="radio" name="transportation" value="no">No
</p>
<hr><b>Additional Information:</b><hr>
<p>
<textarea name="comments" cols="50" rows="5">
Enter any additional information
</textarea>
</p>
<p>
<input type="reset" /> <input type="button" name="next" value=
" Next" onclick="nextForm()" />
</p>
</form>
</body>
</html>
Page 2 of 2
<html>
<head>
<title>Student Registration Form</title>
<script type="text/javascript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
function confirmReset() {
var resetForm = confirm("This will clear the form information. Are you sure?");
if (resetForm == true)
return true;
return false;
}
function submitForm() {
var savedData = "?" + decodeURI(document.cookie);
savedData += "&insprov=" + document.forms[0].insprov.value;
savedData += "&polnum=" + document.forms[0].polnum.value;
savedData += "&insphone=" + document.forms[0].insphone.value;
function nextForm() {
for (var s=0; s<document.forms[0].subject.length; ++s) {
if (document.forms[0].subject[s].checked == true)
document.cookie = encodeURI("&subject="
+ document.forms[0].subject[s].value);
if (document.forms[0].fb.checked == true)
document.cookie = encodeURI("&fb=true");
if (document.forms[0].bk.checked == true)
document.cookie = encodeURI("&bk=true");
if (document.forms[0].bb.checked == true)
document.cookie = encodeURI("&bb=true");
if (document.forms[0].sb.checked == true)
document.cookie = encodeURI("&sb=true");
if (document.forms[0].tr.checked == true)
document.cookie = encodeURI("&tr=true");
if (document.forms[0].fh.checked == true)
document.cookie = encodeURI("&fh=true");
if (document.forms[0].tn.checked == true)
document.cookie = encodeURI("&tn=true");
if (document.forms[0].cc.checked == true)
document.cookie = encodeURI("&cc=true");
if (document.forms[0].sw.checked == true)
document.cookie = encodeURI("&sw=true");
for (var g=0; s<document.forms[0].psat.length; ++g) {
if (document.forms[0].psat[g].checked == true)
document.cookie = encodeURI("&psat="
+ document.forms[0].psat[g].value);
}
document.cookie = encodeURI("&graduation=" + document.forms[0].graduation.value);
document.cookie = encodeURI("&comments=" + document.forms[0].comments.value);
top.location.href="StudentThank.html" + savedData;
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</script>
</head>
<body bgcolor="#cccccc">
<h2><img src="contract.png"> UOP High School - Student Registration Form</h2>
<form action=""method="get" enctype="application/x-www-form-urlencoded" onreset="return confirmReset();">
<hr><b>Medical Information:</b><hr>
<p>
Insurance Provider <input type="text" name="insprov" />
Policy No. <input type="text" name="polnum" />
Phone Number <input type="text" name="insphone" size="13" maxlength="13" value="(xxx)xxx-xxxx">
</p>
<hr><b>Student Interests:</b><hr>
<p>
What is your child's favorite subject?<br />
<input type="radio" name="subject" value="Math" />Math
<input type="radio" name="subject" value="Science" />Science
<input type="radio" name="subject" value="History" />History
<input type="radio" name="subject" value="Foreign Language" />Foreign Language
<input type="radio" name="subject" value="Vocational" />Vocational
<input type="radio" name="subject" value="Computers" />Computers
</p>
<p>
What sports does your child participate in? (check all that apply)<br />
<input type="checkbox" name="fb" value="fb" /> Football
<input type="checkbox" name="bk" value="bk" /> Basketball
<input type="checkbox" name="bb" value="bb" /> Baseball
<input type="checkbox" name="sb" value="sb" /> Softball
<input type="checkbox" name="tr" value="tr" /> Track
<input type="checkbox" name="fh" value="fh" /> Field Hockey
<input type="checkbox" name="tn" value="tn" /> Tennis
<input type="checkbox" name="cc" value="cc" /> Cross Country
<input type="checkbox" name="sw" value="sw" /> Swimming
</p>
<hr><b>Future Interests:</b><hr>
<p>
What does your child plan to do after graduation?
<select name="graduation">
<option value="work">Work</option>
<option value="college">College</option>
<option value="military">Military</option>
</select>
</p>
<p>
If you chose <b>college</b>, do you plan on having your child take the PSAT? <input type="radio" name="psat" value="yes">Yes <input type="radio" name="psat" value="no">No
</p>
<p>Additional information or comments<br />
<textarea name="comments" cols="50" rows="5">
Enter any additional information or comments here
</textarea>
</p>
<p><input type="reset" /> <input type="button" name="next" value=
" Next" onclick="nextForm()" /></p>
</form>
</body>
</html>
Whenever I press the button on the second page, I get two javascript errors. See attached.
This post has been edited by kevinm1019: 28 October 2006 - 12:13 AM

New Topic/Question
Reply


MultiQuote




|