Pages

Sunday, November 14, 2010

CS101 Assignment No. 2 solution

Solution:


<html> <head> <title>Student admission form: Student ID: Your VU ID</title>

<script language="javascript" type="text/javascript">

 function checkForm(){

if (document.regForm.one.value.length < 1){

alert("Empty Form field...! Please fill.");

return false;

}

if (document.regForm.two.value.length < 1){

alert("Empty Form field...! Please fill.");

return false;

}

if (document.regForm.three.value.length < 1){

alert("Empty Form field...! Please fill.");

return false;

}

if (document.regForm.four.value.length < 1){

alert("Empty Form field...! Please fill.");

return false;

}

return true;

}

</script>

</head>

<body background="C:\WINDOWS\Web\Wallpaper\Crystal.jpg" >

<form name="regForm" action="http://www.vu.edu.pk" method="post" onSubmit="return checkForm()">

<table border="0" align="center">

<tr><td align="center" bgcolor="sky blue" width="800" colspan="text">

<font color="white"><b>ADMISSION FORM</b></font></td></tr></table>

<table border="1" bordercolor="sky blue" align="center" bgcolor="white">

<tr><td colspan="2" align="left" bgcolor="sky blue" width="800">

<font color="white"><b>BIO-DATA</b></font></td></tr>

<tr><td align="left" width="30%"><b>Candidate's Name : </b></td>

<td width="70%">

<input type="text" align="left" name="one" size="20" maxlength="25"><b><font color="red">

Max. character limit is 25 </font></b></td></tr>

<tr><td align="left" width="30%"><b>Father's Name : </b></td>

<td width="70%"><input type="text" align="left" name="two" size="20" maxlength="25"><b><font color="red">

Max. character limit is 25 </font></b></td></tr>

<tr><td valign="top" width="30%"><b>Postal-Address : </b></td>

<td width="70%"><textarea name="three" cols="30" rows="3"></textarea><b><font color="red"></td></tr>

<tr><td align="left" width="30%"><b>Upload Your CV : </b></td>

<td width="70%"><input type="file" name="four" value="Browse" enctype="multipart"></td></tr>

<tr><td colspan="2" align="left" bgcolor="sky blue" width="800">

<b><font color="white">EDUCATION</b></font></td></tr>

<tr><td align="left" width="30%"><b>Highest Education : </b></td><td width="70%">

<select name="H.E">

<option selected> --- Click to Select --- </option>

<option>BBA</option>

<option>B.A</option>

<option>BS(IT)</option>

<option>BCS</option>

<option>MBA</option>

<option>MCS</option>

</select></td></tr>

<tr><td valign="top" width="30%"><b>GRADE : </b></td>

<td width="70%"><input type="radio" name="radio">A+<br>

<input type="radio" name="radio">A<br>

<input type="radio" name="radio">B+<br>

<input type="radio" name="radio">B<br>

<input type="radio" name="radio">C+<br>

<input type="radio" name="radio">C<br>

</td></tr>

<tr><td colspan="2" align="left" bgcolor="sky blue" width="800">

<font color="white"><b>DEGREE PROGRAMME</b></font></td></tr>

<tr><td width="30%"><b>Program Applied for: </b></td><td width="70%">

<select name="applied">

<option selected> --- Click to Select --- </option>

<option>MS(CS)</option>

<option>MS(BA)</option>

<option>MCS</option>

<option>MBA</option>

<option>BCS</option>

<option>BBA</option>

</select></td></tr>

<tr><td valign="top" width="30%"><b>Session Applied for : </b></td>

<td width="70%">

<input type="checkbox" name="check">Morning<br>

<input type="checkbox" name="check">Afternoon<br>

<input type="checkbox" name="check">Evening<br>

</td></tr>

<tr><td align="left" width="30%"></td>

<td width="70%"><input type="submit" name="regForm" value="Submit" >

<input type="reset"></td></tr>

<table border="0" align="center">

<tr><td align="center" bgcolor="sky blue" width="800" colspan="text">

</table> </form> </body> </html>

 

Another solution


<HTML>

<HEAD>

<TITLE>New User Registartion form</TITLE>

<SCRIPT>

function checkForm(){

if (document.login.user.value.length < 1) {

window.alert('Empty fields Found!! Please Fill empty fields');

}

else if (document.login.user.value.length > 1) {

window.alert('All Fields are entered');

}

}

function checkForm(){

if (document.login.password.value.length < 1) {

window.alert('Empty fields Found!! Please Fill empty fields');

}

else if (document.login.password.value.length > 1) {

window.alert('All Fields are entered');

}

}

</SCRIPT>

</HEAD>

<BODY>

<FORM name="login" method="post" action=loginScriptURL>

<table border="0" cellpadding="0" cellspacing="0" width="100%">

<tr>

<th align ="left"rowspan="2"><img src="http://icwdic.webcontent-m1.com/m1/res/resource/contest_logos/vu_logo.PNG" width="141" height="88" /></th><td align ="right"><font color ="red"><b>Already a user Login here !!!</b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</tr>

<tr>

<td align="right">User Name<input type="text" name="user" size="20">

 password   <input type="password" name="password" size="10" maxlength="7">

<INPUT type="submit" name="login" value="login"

onMouseOver="checkForm()">

</TD></TR></TABLE><table border="1" bordercolor="lightblue"cellpadding="0" cellspacing="0" width="100%">

<tr>

<td width="100%" bgcolor="Darkblue"><font color="white"><b>Personal Information</b></font></td>

</tr></table></FORM>

<FORM name="submit" method="post" action=submitScriptURL>

<table border="1" bordercolor="lightblue"cellpadding="0" cellspacing="0" width="100%">

<tr><td width="30%">Name</td><td><input type="text" name="user" size="20"></td></tr>

<tr><td width="30%">Father's name</td><td><input type="text" name="fathername" size="20"></td></tr>

<tr><td width="30%">Address</td><td><textarea name="message" cols="20" rows="2"></textarea></td></tr>

<tr><td width="30%">Upload picture</td><td><input name="fileupload" id="fileupload" type="file"> 

</td></tr>                         

</table>

 

 

<table border="1" bordercolor="lightblue"cellpadding="0" cellspacing="0" width="100%">

<tr>

<td width="100%" bgcolor="Darkblue"><font color="white"><b>Account Information</b></font></td>

</tr></table>

<table border="1" bordercolor="lightblue"cellpadding="0" cellspacing="0" width="100%">

<tr><td width="30%">Email</td><td><input type="text" name="email" size="20"></td></tr>

<tr><td width="30%">Password</td><td><input type="password" name="password" size="20" maxlength="7"><b><font color="red">7 characters only*</font></b></td></tr>

<tr><td width="30%">Confirm password</td><td><input type="password" name="cpassword" size="20" maxlength="7"><b><font color="red">7 characters only*</font></b></td></tr>

</table>

 

 

<table border="1" bordercolor="lightblue"cellpadding="0" cellspacing="0" width="100%">

<tr>

<td width="100%" bgcolor="Darkblue"><font color="white"><b>Qualification</b></font></td>

</tr></table>

<table border="1" bordercolor="lightblue"cellpadding="0" cellspacing="0" width="100%">

<tr><td width="30%">Highest Degree</td><td><select name"degree"><option value"select" selected> ---Select---

<option value"Phd">Phd 

<option value"Masters degree">Masters degree

<option value"Bachelors Degree">Bachelors Degree

<option value"Intermediate">Intermediate

</select></td></tr>

<tr><td width="30%">College/University</td><td><input type="text" name="cvname" size="20"></td></tr>

<tr><td width="30%">Status</td><td><input type="radio" name="complete" value="complete" checked>Completed

<input type="radio" name="Continued" value="Continued">Continued</td></tr>

<tr><td width="30%">Degrees achieved</td><td><input type="checkbox" value="PHD">PHD<br>

<input type="checkbox" value="MPhil">MPhil<br>

<input type="checkbox" value="Masters">Masters<br>

<input type="checkbox" value="Bachelors">Bachelors<br>

<input type="checkbox" value="Intermediate">Intermediate<br>

<input type="checkbox" value="Matriculation">Matriculation </td></tr>

<tr><td width="30%"></td><td><input type="submit"name="reg" value="Register"><input type="reset" value="Reset"></td></tr>

</table>

<br>

<table border="1" bordercolor="lightblue"cellpadding="0" cellspacing="0" width="100%">

<tr>

<td width="100%" bgcolor="Darkblue" align="center"><font color="white"><b>2010 All Rights reserved</b></font></td>

Saturday, November 13, 2010

CS101 Assignment No. 2 Announced

Assignment No. 2
Semester: FALL 2010

CS101 Introduction to Computing

 

Total Marks: 15

 

Due Date:

November 22, 2010

Instructions

Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:

 

o        Assignment is submitted after due date.

o        Submitted assignment does not open or file is corrupt.

o        Assignment is copied (From internet/ to from students).

 

Objective

The assignment has been designed to enable Students:

  • Understanding HTML and JavaScript
  • Lectures covered 12 and 15

 

Software (s) Used to develop Assignment

 

Note Pad

 

Assignment Submission Instructions

 

  • The Assignment should be submitted in .html format.
  • Do not submit an image of html document, it is not accepted in any case.
  • Do not submit document / MS-Word file containing your code.

 

Guidelines to Solve Assignment:

 

  • Use Onclick event on submit and reset button to control the empty fields.
  • Submit and Reset buttons are working properly. On submission the form must be navigated to www.vu.edu.pk                                                                                                                          
  • Your controls in the form are well organized and functional.
  • Follow the layout provided to you.
  • Color used in Header, Content and Footer is magenta
  • Web Page Title = Student admission form: Student ID: Your VU ID
  • Follow the Layout ( Header , content, footer)
  • Use Forms and tables to show different controls in the form (Interfacing)
  • Use Onclick () event on submit button in Java Script to control empty fields.
    • Name field length contains maximum 25 characters and not empty.
    • Father's name field contains maximum 25 characters and not empty.
    • Postal address field not empty.
    • CV field not empty.

 

Assignment

 

 

You are required to design an Admission form for educational website in HTML.

 (15 Marks)

 

 

 

Admission page will have three main parts

 

  1. Header
  2. Content
  3. Footer

 

 

Header

 

 

Header contains any heading representing your form, you should write Admission Form there and you may use any image/background color behind the heading.

 

Content

 

 

The content section will contain three sub sections

 

  1. Biodata
  2. Education
  3. Degree Program

Combo Box of Highest Education has these values in it:

-         BBA

-         B.A.

-         BSIT

-         BCS

-         MBA

-         MCS

 

Combo Box of Program Applied For  has these values in it:

-         MS (CS)

-         MS (BA)

-         MCS

-         MBA

-         BCS

-         BBA

 

Footer

 

The Footer section will display a simple footer text(it can be anything)

 

 

 

 

The complete Web page Preview

 

 

Deadline:

Your assignment must be uploaded on or before November 22, 2010.

 

Is this blog is useful for you?

Powered by Blogger.