Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. [10p] Create a Thank you\" page that the user gets to after successfully subm

ID: 3605842 • Letter: 2

Question

2. [10p] Create a Thank you" page that the user gets to after successfully submitting the information (Fig. 2) Thanks for Registration! Your format on First Name: Jokn Last Name: Smth Address: 123 Abercom St State Zip Telephore 912) 123-4567 Email GA 31419 com to the Fig. 2 3. [10p] Create a page that lists all the contacts saved with links from the main page to it (Fig. 3) Existing contacts First Name: John Last Name: Smith Address: 123 Abercom St State: GA Zip: 31419 Telephone: (912) 123-4567 Emal johnsmith@emal com Figure 3

Explanation / Answer

Registration Form(HTML Code):

<html>
<form align=center type=get action="RegDetail.html"> <!--Create a Form and get "RegDetail.html" code-->
<h2>Registration Form</h2>
<table align=center> <!-- Create Table to provide all the objects into specific order and align into center-->
<tr>
<td align=center>First Name:</td>
<td><input type=text name=firstname size=10></td> <!-- Take input text box for First Name-->
</tr>
<tr>
<td>Last Name:</td>
<td><input type=text name=lastname size=10></td> <!-- Take input text box for Last Name-->
</tr>
<tr>
<td>Address:</td>
<td><input type=text name=address size=10></td> <!-- Take input text box for Address-->
</tr>
<tr>
<td>State:</td>
<td><input type=text name=state size=10></td>  <!-- Take input text box for State-->
</tr>
<tr>
<td>Zip:</td>
<td><input type=text name=zip size=10></td>   <!-- Take input text box for Zip Code-->
</tr>
<tr>
<td>Telephone:</td>
<td><input type=text name=tel size=10></td>  <!-- Take input text box for Telephone-->
</tr>
<tr>
<td>Email:</td>
<td><input type=text name=email size=10></td>  <!-- Take input text box for Email-->
</tr>

<tr>
<td colspan=2><input type=submit value="Submit"> <!-- Take input for submit above information and call RegDetail.html-->

</td>
</tr>
</table>  <!-- Table tag end->
</form> <!-- Form tage end->
<table align=center>
<tr>
<form align=center type=get action="contact.html"> <!-- Take another form to contact.html-->
<td colspan=0><input type="submit" value="Contact"> <!--This button call the contact.html file-->
</tr>
</table>
</form>

</html>

Registration Details(HTML Code):


<!-- Registration Details-->
<html>
<form align=center>
<h3 align=center>Thanks for Registration!</h3>
<h4 align=center>Your information is</h4>
<script LANGUAGE="JavaScript"> <!--Creating JavaScript to access each parameter from Registration.html-->
function getParams(){ <!--Creae a function to get all Parameter in the Registration.html-->
var idx = document.URL.indexOf('?');
var params = new Array(); <!--Take an array of all parameter of Registration.html-->
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&'); <!--tak all pairs of the parameter split the &-->
for (var i=0; i<pairs.length; i++){ <!--Take for until length of the pairs of parameter-->
nameVal = pairs[i].split('=');
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
params = getParams(); <!--assign getParams() function to params variable this is access all parameters-->
firstname = unescape(params["firstname"]);
lastname = unescape(params["lastname"]);
address = unescape(params["addr"]);
state = unescape(params["state"]);
email=unescape(params["email"]);
zip=unescape(params["zip"]);
tel=unescape(params["tel"]);

document.write("First Name : " + firstname + "<br>");
document.write("Last Name : " + lastname + "<br>");
document.write("Address :" + address + "<br>");
document.write("State :" + state + "<br>");
document.write("Zip :" + zip + "<br>");
document.write("Email : " + email + "<br>");
document.write("Telephone : " + tel +"<br>");
</script>
<a href="Registration.html">Back to Registration Form</a>
</form>
</html>

Contact Details(HTML Code):

<html>

<form align=center>
<h3 align=center>Existing Contacts</h3>

<script LANGUAGE="JavaScript">
function getParams(){
var idx = document.URL.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
for (var i=0; i<pairs.length; i++){
nameVal = pairs[i].split('=');
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
params = getParams();
firstname = unescape(params["firstname"]);
lastname = unescape(params["lastname"]);
address = unescape(params["addr"]);
state = unescape(params["state"]);
email=unescape(params["email"]);
zip=unescape(params["zip"]);
tel=unescape(params["tel"]);

document.write("First Name : " + firstname + "<br>");
document.write("Last Name : " + lastname + "<br>");
document.write("Address :" + address + "<br>");
document.write("State :" + state + "<br>");
document.write("Zip :" + zip + "<br>");
document.write("Email : " + email + "<br>");
document.write("Telephone : " + tel +"<br>");
</script>
<a href="Registration.html">Back to Registration Form</a>
</form>
</html>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote