roosnanie
09-24-2012, 02:53 AM
I have this assignmnet.. due at midnight.. well the book in no way explains An array to the extent to do what he is asking..
we are to build a page for a run ask a user a bunch of information, have a pop up saying welcome to the username and how much the race will cost
as well as an external html that when the user hits submit it comes up with a tidy little runner information page..
here is what i have ..
help please..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Major Project 1 Cist 1529</title>
<script language="JavaScript" type="text/javascript">
//<![CDATA[
function Shirtform (form){
for (Count = 0; Count < 5; Count++) {
if (form.rad[Count].checked)
break;
}
alert ("You Chose " + Count + " tshirt");
}
function registerResults (form) {
var runRegister = form.inputbox.value;
alert ( Run_Name + "we welcome you to the Frostbite 5k held on December 9th, 2011
your total cost for entering the race is $ " + run_Fee + " If you have any questions about your registration please contact
us at racedirectorfrostbite5kcom" );
}
var Run_Name = document.getElementById ('name.value');
var Run_Address = document.getElementById('addres.value');
var Run_City = document.getElementById('city.value');
var Run_State = document.getElementById('state.value');
var Run_Zip= document.getElementById('zip.value');
var Run_Phone = document.getElementById('phone.value');
var Run_Email = document.getElementById('email.value');
var Run_Age = document.getElementById('age.value');
var Run_shirt = document.getElementById('shirt');
var run_fee = document.getElemtntById('runFee.value');
var shirt_fee= document.getElementById('(“radio_form”).foods;);
function readBoxes()
{
CustInfo = new Array(
new Array ("Run_Name", "Run_Address", "Run_City", "Run_State", "Run_Zip", "Run_Phone", "Run_Email", "Run_Age", "Run_Shirt")
);
for (x = 0; x < 9; x++)
{
CustInfo[0][x] = document.getElementById(CustInfo[0][x]).value;
}
//Calculate Price
}
function runFee()
if(age <= "60" ) {
runFee = "20" \n';
}
else (age>"60"{
runFee = "15" '\n';
}
}
//]]>
</script>
</head>
<body>
<body background="frost.jpg">
<h2>FROST*BITE*RUN</h2>
<h3>REGISTER HERE</h3>
<br />
<p>Please Fill out all of the information below</p>
<FORM NAME="myform" ACTION="" METHOD="GET">
<form method="POST" action="submitted.html" name="form">
<table border="0" cellpadding="0" width="550" id="table2">
<tr>
<td width="340" align="right"><font color="#BF1D5E">NAME</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Name" id="Run_Name" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">ADDRESS</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Address" id="Run_Address" size="30" tabindex="1"></td>
</tr>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">CITY</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_City" id="Run_City" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">STATE</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_State" id="Run_State" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">ZIP</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Zip" id="Run_Zip" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">EMAIL</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Email" id="Run_Email size="30" tabindex="1"></td>
</tr>
<tr>
<td width="340" align="right"><font color="#BF1D5E">PHONE</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Phone" id="Run_Phone" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">AGE</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Age" id="Run_Age" size="30" tabindex="1"></td>
</tr>
<tr>
<td width="340" align="right"><font color="#BF1D5E">shirt size (s-m-l-xl-xxl-xxl)</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Shirt" id="Run_Shirt" size="30" tabindex="1"></td>
</tr>
<tr>
<td width="340" align="right"> </td>
<td width="10"> </td>
<td width="200"> </td>
</tr>
</table>
<table border="0" cellpadding="0" width="550" id="table3">
<tr>
<td width="563">
<p align="center">
<input type="submit" value="Submit" name="subButton" tabindex="50">
<input type="reset" value="Reset" name="resetButton" tabindex="50"></td>
</tr>
</table>
</form>
<FORM NAME="Shirtform">
<INPUT TYPE="button" NAME="button" Value="Choose Tshirt Size" id="shirt_Fee"
onClick="testButton(this.form)"> <BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button1" onClick=0>SMALL<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button2" onClick=0>MEDIUM<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0>LARGE<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0>XL<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0>XXL<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0>XXXL<BR>
</FORM>
</body>
</html>
we are to build a page for a run ask a user a bunch of information, have a pop up saying welcome to the username and how much the race will cost
as well as an external html that when the user hits submit it comes up with a tidy little runner information page..
here is what i have ..
help please..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Major Project 1 Cist 1529</title>
<script language="JavaScript" type="text/javascript">
//<![CDATA[
function Shirtform (form){
for (Count = 0; Count < 5; Count++) {
if (form.rad[Count].checked)
break;
}
alert ("You Chose " + Count + " tshirt");
}
function registerResults (form) {
var runRegister = form.inputbox.value;
alert ( Run_Name + "we welcome you to the Frostbite 5k held on December 9th, 2011
your total cost for entering the race is $ " + run_Fee + " If you have any questions about your registration please contact
us at racedirectorfrostbite5kcom" );
}
var Run_Name = document.getElementById ('name.value');
var Run_Address = document.getElementById('addres.value');
var Run_City = document.getElementById('city.value');
var Run_State = document.getElementById('state.value');
var Run_Zip= document.getElementById('zip.value');
var Run_Phone = document.getElementById('phone.value');
var Run_Email = document.getElementById('email.value');
var Run_Age = document.getElementById('age.value');
var Run_shirt = document.getElementById('shirt');
var run_fee = document.getElemtntById('runFee.value');
var shirt_fee= document.getElementById('(“radio_form”).foods;);
function readBoxes()
{
CustInfo = new Array(
new Array ("Run_Name", "Run_Address", "Run_City", "Run_State", "Run_Zip", "Run_Phone", "Run_Email", "Run_Age", "Run_Shirt")
);
for (x = 0; x < 9; x++)
{
CustInfo[0][x] = document.getElementById(CustInfo[0][x]).value;
}
//Calculate Price
}
function runFee()
if(age <= "60" ) {
runFee = "20" \n';
}
else (age>"60"{
runFee = "15" '\n';
}
}
//]]>
</script>
</head>
<body>
<body background="frost.jpg">
<h2>FROST*BITE*RUN</h2>
<h3>REGISTER HERE</h3>
<br />
<p>Please Fill out all of the information below</p>
<FORM NAME="myform" ACTION="" METHOD="GET">
<form method="POST" action="submitted.html" name="form">
<table border="0" cellpadding="0" width="550" id="table2">
<tr>
<td width="340" align="right"><font color="#BF1D5E">NAME</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Name" id="Run_Name" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">ADDRESS</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Address" id="Run_Address" size="30" tabindex="1"></td>
</tr>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">CITY</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_City" id="Run_City" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">STATE</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_State" id="Run_State" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">ZIP</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Zip" id="Run_Zip" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">EMAIL</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Email" id="Run_Email size="30" tabindex="1"></td>
</tr>
<tr>
<td width="340" align="right"><font color="#BF1D5E">PHONE</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Phone" id="Run_Phone" size="30" tabindex="1"></td>
</tr>
<tr> <td width="340" align="right"><font color="#BF1D5E">AGE</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Age" id="Run_Age" size="30" tabindex="1"></td>
</tr>
<tr>
<td width="340" align="right"><font color="#BF1D5E">shirt size (s-m-l-xl-xxl-xxl)</font></td>
<td width="10"> </td>
<td width="200"><input type="text" name="Run_Shirt" id="Run_Shirt" size="30" tabindex="1"></td>
</tr>
<tr>
<td width="340" align="right"> </td>
<td width="10"> </td>
<td width="200"> </td>
</tr>
</table>
<table border="0" cellpadding="0" width="550" id="table3">
<tr>
<td width="563">
<p align="center">
<input type="submit" value="Submit" name="subButton" tabindex="50">
<input type="reset" value="Reset" name="resetButton" tabindex="50"></td>
</tr>
</table>
</form>
<FORM NAME="Shirtform">
<INPUT TYPE="button" NAME="button" Value="Choose Tshirt Size" id="shirt_Fee"
onClick="testButton(this.form)"> <BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button1" onClick=0>SMALL<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button2" onClick=0>MEDIUM<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0>LARGE<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0>XL<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0>XXL<BR>
<INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0>XXXL<BR>
</FORM>
</body>
</html>