CS101 Assignment No 2 Spring 2017
Here we have Graded assignment and solution of CS101 - Introduction to Computing Assignment No 02 Solution and Discussion Spring 2017. Assignment Due Date: May 22, 2017.
CS101 Assignment Instructions
It should be clear that your assignment will not get any credit (zero marks) if:- The assignment is submitted after due date.
- The submitted assignment is other than .html.
- The submitted assignment does NOT open or file is corrupted.
- The assignment is copied (from other student or ditto copy from handouts or internet).
CS101 Assignment Uploading instructions
For clarity and simplicity, you are required to Upload/Submit only .html file.CS101 Assignment Objective
The objective of this assignment is:- To understand the basics of html tables
- To understand how to use interactive forms
- To understand the concept of validation / check on different fields
Recommended : CS411 Assignment No 2 Solution Spring 2017
Please Note:
No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
CS101 Assignment No 2
Suppose a university offers admissions in different disciplines. To facilitate far flung areas students, the administration decided to make an online webpage through which students can get registered online.- You as a web programmer need to design a webpage having an interactive form which will accept necessary bio data of the student.
- Make some restriction or validation checks on all fields which make sure that no field can be left empty while pressing submit button. The appropriate message will be shown in case of empty field as shown in the screen shot .
CS101 Assignment No 2 Spring 2017 image - 2 |
CS101 Assignment No 2 Spring 2017 image - 3 |
CS101 Assignment No 2 Spring 2017 image - 4 |
CS101 Assignment No 2 Spring 2017 image - 5 |
CS101 Assignment No 2 Solution
Sample Solution Code:
<!-- CS101 ASSIGNMENT NO. 2-->
<head>
<title>MC000000</title><script>
function chkfields() {
if (document.form1.fname.value<1)
window.alert("Name field empty! Please fill")
if (document.form1.cnic.value<1)
window.alert("CNIC field empty! Please fill")
if (document.form1.course.value<1)
window.alert("Course field empty! Please fill")
if (document.form1.session.value<1)
window.alert("Session field empty! Please fill")
if (document.form1.email.value<1)
window.alert("Email field empty! Please fill")
if (document.form1.pswd.value<1)
window.alert("Password field empty! Please fill")
if (document.form1.address.value<1)
window.alert("Address field empty! Please fill")
if (document.form1.gender.value<1)
window.alert("No gender selected! Please select ")
if (document.form1.city.value<1)
window.alert("City not selected! Please select")
};
</script>
</head>
<!--Bc1160000-->
<body bgcolor="#C3C3C3">
<h1 align="center">Student Name: ABC</h1>
<h2 align="center">Student Id: Bc1600000</h2>
<h3 align="center">Registration Form</h3>
<form name="form1">
<table border="0" width="512" align="center" bgcolor="#D7D7D7">
<tr>
<td>Name</td>
<td><input type="text" name="fname" id="name"></td>
<td>CNIC</td>
<td><input type="text" name="cnic" id="cnic"></td>
</tr>
<tr>
<td>Course</td>
<td><input type="text" name="course" id="course"></td>
<td>Session</td>
<td><input type="text" name="session" id="session"></td>
</tr>
<tr>
<td>Email</td>
<td><input type="email" name="email" id="email"></td>
<td>Password</td>
<td><input type="password" name="pswd" id="pswd"></td>
</tr>
<tr>
<td>Address</td>
<td colspan="3"><textarea cols="20" id="address"></textarea></td>
</tr>
<tr colspan="2">
<td>Gender</td>
<td colspan="3"><input type="radio" name="gender" id="male" value="Male"> Male
<input type="radio" name="gender" id="female" value="Female">Female</td>
</tr>
<tr>
<td>City</td>
<td colspan="3">
<select name="city">
<option value="">---Select--- </option>
<option value="faisalabad">Faisalabad</option>
<option value="lahore">Lahore</option>
<option value="islamabad">Islamabad</option>
</select></td>
</tr>
<tr>
<td colspan="2">
<input type="checkbox" name="new_student" value="nstudent"> New Student
</td>
<td colspan="2"><input type="checkbox" name="con_student" value="constudent"> Continuing Student
</td>
</tr>
<tr>
<td colspan="2" align="right"><input type="submit" value="Submit" onClick="chkfields()"></td>
<td colspan="2" align="left"><input type="reset" value="Reset"></td>
</tr>
</table>
</form>
</body>
</html>
Download CS101 Assignment no 2 Solution file
You can Download CS101 Assignment No 2 Solution in .html and text file from the link below:
Recommended for CS101 Midterm Exam Preparation:
If You liked this post please share with your friends. Thank You.
Aslaamun alaikum to all and i am the student of MBA from Virtual University of Pakistan by Online( Overseas). Now i have to solve the assignment No.3 2018 for the course of CS101- Introduction to Computing. My Request to all members that any body can me help in this matter?
ReplyDeleteThanks. Muhammad Saleem