0% found this document useful (0 votes)
50 views11 pages

Instructions: Assignment No. 02 SEMESTER Spring 2017 CS101-Introduction To Computing Total Marks: 20 Due Date

This document contains instructions for Assignment No. 02 for the course CS101 - Introduction to Computing. It states that the assignment should be submitted as an HTML file by the due date and time. It also lists validation checks that need to be implemented in the assignment, such as not allowing empty fields when submitting a registration form. The objective of the assignment is to design an interactive registration form using HTML and JavaScript that validates the fields.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views11 pages

Instructions: Assignment No. 02 SEMESTER Spring 2017 CS101-Introduction To Computing Total Marks: 20 Due Date

This document contains instructions for Assignment No. 02 for the course CS101 - Introduction to Computing. It states that the assignment should be submitted as an HTML file by the due date and time. It also lists validation checks that need to be implemented in the assignment, such as not allowing empty fields when submitting a registration form. The objective of the assignment is to design an interactive registration form using HTML and JavaScript that validates the fields.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 11

Assignment No.

02(Graded) Total Marks:


SEMESTER Spring 2017
Due Date: 22/
CS101- Introduction to Computing

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:

o The assignment is submitted after due date.


o The submitted assignment is other than .html.
o The submitted assignment does NOT open or file is corrupted.
o The assignment is copied (from other student or ditto copy from handouts or internet).

Uploading instructions

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

Objective

The objective of this assignment is:

o To understand the basics of html tables


o To understand how to use interactive forms
o 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.

2. 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.
SOLUTION:
<html>

<HEAD>

<SCRIPT>

function checkForm()

if(document.student.stName.value.length < 1)

window.alert ("please provide your Name");

if(document.student.CNIC.value.length < 1)

window.alert ("please provide your CNIC");

if(document.student.COURSE.value.length < 1)

{
window.alert ("please provide your COURSE");

if(document.student.SESSION.value.length < 1)

window.alert ("please provide your SESSION");

if(document.student.EMAIL.value.length < 1)

window.alert ("please provide your EMAIL");

if(document.student.PASSWORD.value.length < 1)

window.alert ("please provide your PASSWORD");

if(document.student.ADDRESS.value.length < 1)

window.alert ("please provide your ADDRESS");

}
if(document.student.GENDER.value.length < 1)

window.alert ("please provide your GENDER");

if(document.student.STUDENTSTATUS.value.length < 1)

window.alert ("please provide your STUDENTSTATUS");

</SCRIPT>

</HEAD>

<BODY style="background-color:lightblue;">

<H1 align="CENTER"> Student Name : IRAM REHMAN </H1>

<H2 align="CENTER"> Student ID : DS170200274 </H2>

<H3 align="CENTER"> REGISTRATION FORM </H3><BR>

<TABLE >
<FORM name="student" method="post" >

<TR>

<TD> NAME: </TD>

<TD><input type="text" name="stName" SIZE="30" ></TD>

<TD> CNIC: </TD>

<TD><input type="text" name="CNIC" SIZE="30" ></TD></TR>

<TR>

<TD> COURSE: </TD>

<TD><input type="text" name="COURSE" SIZE="30" ></TD>

<TD> SESSION: </TD>

<TD><input type="text" name="SESSION" SIZE="30" ></TD> </TR>

<TR>

<TD> EMAIL: </TD>

<TD><input type="text" name="EMAIL" SIZE="30" ></TD>

<TD> PASSWORD: </TD>

<TD><input type="text" name="PASSWORD" SIZE="30"


></TD></TR>

<TD> ADDRESS: </TD>

<TD><TEXTAREA name="ADDRESS" COLS="30" ROWS="6"


></TEXTAREA></TD></TR>

<TR><TD>GENDER</TD>
<TD><INPUT TYPE= "RADIO" NAME="GENDER" VALUE="MALE"
>MALE

<TD><INPUT TYPE= "RADIO" NAME="GENDER"


VALUE="FEMALE">FEMALE </TR>

<TR><TD>CITY </TD>

<TD> <SELECT SIZE="1" NAME="FROM">

<option value="SLCT" >--------SELECT--------</OPTION>

<option value="IBD" >ISLAMABAD</OPTION>

<option value="LHR">LAHORE</OPTION>

<option value="PWR">PESHAWAR</OPTION>

<option value="QTA">QUETTA</OPTION>

<option value="KHI">KARACHI</OPTION>

</SELECT></TD></TR>

<TR>

<TD COLSPAN="2"><INPUT TYPE= "CHECKBOX"


NAME="STUDENTSTATUS" VALUE="NEW STUDENT">NEW STUDENT

<TD COLSPAN="2"><INPUT TYPE= "CHECKBOX"


NAME="STUDENTSTATUS" VALUE="CONTINUING STUDENT">CONTINUING
STUDENT </TR>

<TR>

<TD>

<input type="SUBMIT"
name = "SUBMIT"

value= "SUBMIT"

onClick="checkForm()">

</TD>

<TD align="LEFT"> <input type="RESET" >


</TD> </TR>

</FORM>

</TABLE>

</BODY>

</html>
GOOD LUCK

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy