VU Projects Video Lectures Handouts Past Papers Quizzes Assignments & GDB border= Members Free SMS Service FB Page
VU Projects Video Lectures Handouts Past Papers Quizzes Assignment,GDB Members SMS Service FB Page

CS101 - Introduction to Computing Assignment No. 2 Solution and Discussion Spring 2017 Due Date: May 22, 2017 

Assignment No. 02(Graded)
SEMESTER Spring 2017
CS101- Introduction to Computing

Total Marks: 20

Due Date: 22/5/2017

 

Instructions

Please read the following instructions carefully before solving & submitting assignment:

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).

 

Uploading instructions

  • For clarity and simplicity, you are required to Upload/Submit only .html file.

 

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

 

For any query about the assignment, contact at cs101@vu.edu.pk

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.

 

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.  

  1. You as a web programmer need to design a webpage having an interactive form which will accept necessary bio data of the student.

The sample webpage shuold look like the following screen shot.

  1. Make some restriction or validation checks on all fields which make sure that no field can be left empty while pressing submit button. The  appropriat  message will be  shown in case of empty field as shown in the screen shot .


Note: No marks will be given if student does not mention his/ her name and VU ID at the top of the registration form.

 

Note: Use only Notepad to write html and JavaScript code. If any other tool is used, then zero marks will be awarded.

 

GOOD LUCK

Views: 3704

Replies to This Discussion

<html>
<!-- CS101 ASSIGNMENT NO. 2-->
<head>
<title>MC1600000</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>
<!---->



Codding Attached

Attachments:
Thanks brother

RSS

SPONSORED LINKS

© 2018   Created by Muhammad Anwar Tahseen.   Powered by

Badges  |  Report an Issue  |  Terms of Service