You are on page 1of 108

PROGRAM:

<!--PSEUDO ELEMENTS-->

<html>

<head>

<title>css1 test content</title>

</head>

<style type="text/css">

body

margin:0.5in;background-color:white

ul

list-style-image:url(E:\karthi\web\emperor\23.gif);

list-style-position:outside;padding-left:20

pre

font-family:arial;color:red;background-color:yellow

color:red;

clear:left

a:link

color:lime
}

a:visited

color:firebrick

a:active

color:yellow

p.firsttype:first.letter

color:red

p.firsttype:first-line

font-variant:small-caps

</style>

<body>

<h1><center>this is the css1 test content</center></h1>

<p style="white-space:pre">

in order to demonstrate<strong>css1 style sheets</strong>

i created this test content document,which contains

samples of most types of web page content

</p>

<p class= firsttype>

css1 can impact on a document generally,

as well as individual elements such as:


</p>

<ul>

<pre>

<li> lists

<li> headers

<li> images

<li> paragraphs

<li> inline paragraphs

<li> tables

<li> forms and form elements

</pre>

</u>

<p>

<img src="E:\karthi\web\emperor\23.gif" style="float:right">css1 can also

alter the presentation of certain pseudo-elements such as

<a href="#next">hypertext links</a>

or the first line or character within a line.

ther actually isnt<a name="next">anything</a>

that cant in some way

</p>

</body>

</html>
OUTPUT:

RESULT:

Thus the html program as be executed successfully and the result is


displayed.
PROGRAM:

<!--FORM WITH SPACING-->

<html>

<head>

<title>table examples</title>

</head>

<body>

<form>

<table width=70% frame=border border=4 rules=groups

align=center cols=4 cellspacing=5 cellpadding=10>

<caption align = top>please enter the following

information:</caption>

<!-- the submit and reset buttons -->

<tfoot>

<tr>

<td> </td>

<td>

<input type = submit>

</td>

<td>

<input type = reset>

</td>

<td></td>

</tr>

<tbody>

<!--first form row -->

<tr><th align = right>firstname:</th>

<td><input type=text name=first name></td>


<th align=right>last name:</th>

<td><input type=text name=lastname></td>

</tr>

<!--second form row -->

<tr><th align = right>address:</th>

<td><input type=text name=address></td>

<th align=right>city and state:</th>

<td><input type=text name=citystate></td>

</tr>

<!--third form row -->

<tr>

<th align=right>primary colors:</th>

<td>

<select name="colors">

<option value="ig">ivory/dark green

<option selected value="ir">ivory/rust

<option value="w1">white/black

<option value="wb">white/blue

<option value="ar">aqua/rust

</select>

</td>

<th align=right>secondary color:</th>

<td>

<select name="colors2">

<option value="ig">ivory.dark green

<option selected value="ir">ivory/rust

<option value="w1">white/black

<option value="wb">white/blue
<option value="ar">aqua/rust

</select>

</td>

</tr>

<!-- last form row-->

<tr>

<td colspan=2 align=right>

low resolution images:<input type="radio"

name="imageon" value="low res" checked>

</td>

<td colspan=2 align=left>

high resolution images:<input type="radio"

name="imageon" value="hi res">

</td>

</tr>

</table>

</form>

</body>

</html>
OUTPUT:

RESULT:

Thus the html program as be executed successfully and the result is


displayed.
PROGRAM:

<!—FRAME SET -->

<!--Main Frameset HTML page parent2.htm-->

<html>

<frameset rows="*,80">

<frame src=main2.html name="workframe" frameborder=0 scrolling=no>

<frame src=menu2.html name="menuframe" frameborder=0 scrolling=no>

</frameset>

</html>

<!--main menu page menu2.htm-->

<html>

<head>

<style type="text/css">

body{background-color:white}

#heading{color:yellow;position:absolute;left:15;top:10;font-size:24pt}

#heading2{color:black;position:absolute;left:17;top:12;font-size:24pt}

</style>

<script language="javascript1.2">

<!--

//change layer to reflect image map mouse position function change content(item){

string="<h2> over "+item+"</h2>";

parent.workFrame.document.content.document.write(string);

parent.workFrame.document.content.document.close();

//-->

</script>

<script language="javascript">
<!--

//change layer to reflect image map mouse position function change content(item){

string="<h2> over" + item + "</h2>";

parent.workFrame.content.innerHTML=string;

//-->

</script>

</head>

<body>

<map name=menu>

<area shape=rect coords="0,0,100,57" href="#test"


onMouseOver="change_content('main')">

<area shape=rect coords="101,0,201,57" href="#test"


onMouseOver="change_content('page1')">

<area shape=rect coords="202,0,302,57" href="#test"


onMouseOver="change_content('page2')">

<area shape=rect coords="303,0,403,57" href="#test" onMouseOver="change-


content('page3')">

<area shape=rect coords="404,0,504,57" href="#test"


onMouseOver="change_content

('help')">

<area shape=default href="#test" onMouseOver="change_content('menu page')">

</map>

<img align=right src="menu.jpg" width=504 height=57

onclick="change_content()" usemap="#menu" border=0>

<span id="heading">welcome</span>

<span id="heading2">welcome</span>

</html>
<!--main frame page main2.htm-->

<html>

<head>

<style type="text/css">

body{ background-color:black;color:yellow;

margin: 0.1in 0.4in}

h2{color:lime;font-size:48pt;

font-family:cursive;font-style:italic

</style>

</head>

<body>

<h1>main body</h1>

<div id="content" style="position:absolute;left:50;top:100;color:lime">

<h1>starting contents</h1>

</div>

</body>

</head>

</html>
OUTPUT:

RESULT:

Thus the html program as be executed successfully and the result is


displayed.
PROGRAM:

<!--MULTIMEDIA ELEMENTS -->

<html>

<head>

<title>multimedia</title>

</head>

<body>

<h1>shelly's first</h1>

<table cols=3 border=0 width=90% align=center cellpadding=20>

<tr><td width =10%>

<a href="E:\songs\Tamil videos\8.vob" >song </a>

</td><td width=50%>

<object id=themusic classid=CLSID:05589FA1-C356-11CE-BF01-00AA0055595A>

<param name= filename value= "E:\songs\Tamil videos\8.vob">

</object>

</td><td width=40%>

<embed src="E:\songs\Tamil videos\8.vob">

</td><tr>

<tr><td colspan=3>

a little tune i created using microsoft producer

</td></tr>

</table>

</body>

</html>
OUTPUT:

RESULT:
Thus the html program for displaying multimedia elements has been
executed successfully and the result is displayed.

PROGRAM:

<!—EMBEDDED OBJECTS-->

<html>

<head>

<title>MULTIMEDIA</title>

<style type="text/css">

h1

color:red;

text-align:center;

</style>

</head>

<body>

<h1>Sri Venkateshwara College</h1>

<object classid="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A"

style="position:absolute;left:35%;top:100">

<param name="filename" value="avp-210.mpg">

<param name="DisplayBackColor" value="&H00F00">

<param name="DisplayForeColor" value="&H000000">

<param name="Rate" value="1.25">

</object>

</body>

</html>
OUTPUT:

RESULT:

Thus the html program for displaying embedded objects has been executed
successfully and the result is displayed.
PROGRAM:

<!—CREATING A FORM-->

<html>

<head>

<title>TEXT CONTROLS</title>

<style type="text/css">

#formlayout

background-color:aqua;

border-color:red; border-style:groove; border-width:6;

padding:10;position:absolute;left:10;top:10;width:600

TD.label

width:150;text-align:right;color:red;font-family:Univers;

font-size:18pt

TD.control

text-align:left

INPUT

color:red;font-family:Cursive;

font-style:italic;
font-size:14pt

</style>

</head>

<body>

<!--form 1-->

<DIV id="formlayout">

<form name="form1" ACTION="results.htm" method="GET">

<TABLE cols=2 border=0 cellspacing=10>

<!--first row-->

<tr><td width=150 class=label>

<LABEL for="first" accesskey="N">

Enter your<SPAN style="text-decoration:underline">N</SPAN>ame:

</LABEL></a></td>

<td class=control>

<INPUT tabindex=2 NAME="personname" id="first" type="text" size="50">

</td></tr>

<!--Second row-->

<tr><td class=label>

<LABEL disabled for="second" accesskey="A">

Enter your<SPAN style="text-decoration:underline">A</SPAN>ddress:

</LABEL></a></td>

<td class=control>

<TEXTAREA disabled tabindex=3 NAME="address" id="second" rows=10 cols=50

style="color:maroon;font-family:sans-serif;font-variant:small-caps">

</TEXTAREA>
</td></tr>

<!--Third row-->

<tr><td class=label>

<LABEL for="third" accesskey="P">

Enter your<SPAN style="text-decoration:underline">P</SPAN>assword:

</LABEL></td>

</td>

<td class=control>

<INPUT tabindex=2 Type="password" name="psswrd" id="third" size="20">

</td></tr>

<!--Fourth row-->

<tr><td colspan=2 class=label>

<FIELDSET>

<LEGEND align=left>Color Preferences:</LEGEND>

<INPUT type="radio" name="colors" value="Blue" checked>Blue

<INPUT type="radio" name="colors" value="Red">Red

<INPUT type="radio" name="colors" value="Green">Green

</FIELDSET>

</td></tr>

<tr><td class=label colspan=2>This image is actually a button

<INPUT type="IMAGE" src="8.jpg" ALT="button"></td></tr></table>

</FORM>

</DIV>

</BODY></html>

OUTPUT:
RESULT:

Thus the program to display page elements has been executed successfully.

PROGRAM:

<!--JAVA SCRIPT FOR MULTIPLY 2 NUMBERS-->


<html>

<head>

<title>simple multiplication</title>

<script type="text/javascript">

function multiply()

var number_one=document.the_form.field_one.value;

var number_two=document.the_form.field_two.value;

var result=number_one*number_two;

alert(number_one+"times"+number_two+"is:"+result);

</script>

</head>

<body>

<form name="the_form">

Number 1:<input type="text" name="field_one"><br>

number 2:<input type="text" name="field_two"><br>

<a href="#" onclick="multiply();return false;">

multiply them!</a>

</form>

</body>

</html>

OUTPUT:
RESULT:

Thus the java script program for multiplying two numbers executed
successfully.

PROGRAM:
<!—FORM FOR ORDERING PRODUCTS ONLINE-->

<HTML>

<HEAD>

<TITLE>A JavaScript Order Form</TITLE>

</HEAD>

<BODY>

<H2>A JavaScript Order Form</H2>

<HR>

<FORM NAME="OrderForm">

<TABLE BORDER=O WIDTH="75%">

<TR>

<TD><I>First Name</I></TD>

<TD>

<INPUT TYPE=text NAME=”FirstName SIZE=30

onfocus=”window.status=’Enter your first name please.' ;">

</TD>

</TR>

<TR>

<TD><I>Last Name</I></TD>

<TD>

<INPUT TYPE=text NAME="LastName" SIZE=30

onfocus="window.status='Enter your last name please.';">

</TD>
</TR>

<TR>

<TD><I>Street Address</I></TD>

<TD COLSPAN="3">

<INPUT TYPE=text NAME= "Address" SIZE=50

onfocus=”window.status=’Enter your mailing address please. ;“>

</TD>

</TR>

<TR>

<TD><I>City</I></TD>

<TD>

<INPUT TYPE=text NAME="City" SIZE=30

onfocus="window.status='Enter your city please.';">

</TD>

<TD><I>State</I></TD>

<TD>

<INPUT TYPE=text NAME="State" SIZE=3

onfocus="window.status='Enter your state please.' ;">

</TD>

<TD><I>ZIP</I></TD>

<TD>

<INPUT TYPE=text NAME="Zip" SIZE=11

onfocus="window.status='Enter your zip code please.';">

</TR>
</TABLE>

<p>

<CENTER>

<I>Would you like to be on our mailing list?</I>

<INPUT TYPE=checkbox NAME="List" CHECKED

onClick="notify();" > <B>Yes</B>

</CENTER>

<p>

<HR WIDTH=50% ALIGN=CENTER>

<p>

<B>Select the Item You Want to Order</B><br>

<SELECT NAME="OrderItem">

<OPTION VALUE=8.95>Our Basic Item in Grey ($8.95)

<OPTION VALUE=12.95>Our Basic Item in Color ($12.95)

<OPTION VALUE=24.99>Our Mid-Range Color Item ($24.99)

<OPTION VALUE=’99.95>Our Super Deluxe Item ($99.95)

</SELECT>

<p>

<B>Select Quantity of Items to Order</B><br>


<SELECT NAME="Quantity">

<OPTION VALUE= 1 >One

<OPTION VALUE=2>Two

<OPTION VALUE=3>Three

<OPTION VALUE= 4 >Four

</SELECT>

<p>

<B>Total Due </B>

<INPUT TYPE=text NAME="Total" SIZE=11

onfocus="totalOrder(this.form) ";>

<HR>

<p>

<INPUT TYPE="submit" VALUE="P1ace Order">

<INPUT TYPE="reset" VALUE="Clear the Form">

</FORM>

<SCRIPT LANGUAGE="JavaScript1.1">

<!--

function notify() {

alert (Please be aware that our mailing list is for \n

internal use only, and your name will not \n

be sold or redistributed in any form. \n\n

Please Reconsider. Thanks!);

function totalOrder(form) {
var x = form.OrderItem.options[form.OrderItem.selectedIndex].value;

var y = form.Quantity.options[form.Quantity.selectedIndex].value;

var due = (x * y);

form.Total.value = due;

//-->

</SCRIPT>

</BODY>

</HTML>
OUTPUT:

RESULT:

Thus the form for ordering products in online as been executed successfully.
PROGRAM:

<!--validating html content-->

<html>

<head>

<script type="text/javascript">

function checkMandatoryFields()

var error_Message=" ";

//check text box

if(window.document.the_form.the_text.value=="")

error_Message+="please enter your name.\n";

//check scrolling list

if(window.document.the_form.state.selectedIndex<0)

error_Message+="please select a state.\n";

//check radio button

var radio_selected="false";

for(var index=0;index < window.document.the_form.gender.length;

index++)

radio_Selected="true";

} }
if(radio_Selected=="false")

error_Message+="Please select a gender.\n";

if(error_Message==" ")

return true;

else

error_Message="please correct the following errors:\n\n"+error_Message;

alert(error_Message);

return false;

} }

</script>

</head>

<body bgcolor="lightblue">

<h1>please provide youuur details below</h1>

<form name="the_form" action=" " method="post" onSubmit="var the_result=

checkMandatoryFields(); return the_result;">

<table border ="2" bgcolor="yellow">

<tr>

<td><b>name:</b></td>

<td><input type="text" name="the_text"></td>

</tr>

<tr /><tr />

<tr>
<td><b>State:</b></td>

<td>

<select name="state" size="5">

<option value="andra">andrapradesh</option>

<option value="bihar">bihar</option>

<option value="mp">madhya pradesh</option>

</select>

</td> </tr>

<tr /><tr />

<tr>

<td><b>Gender:</b></td>

<td>

<input type="radio" name="gender">female

<input type="radio" name="gender">male

</td></tr>

<tr /><tr />

<tr>

<td><input type="submit" value="submit form"></td>

</tr>

<tr /><tr />

</table>

</form>

</body>

</html>

OUTPUT:
RESULT:

Thus the java script for form validation has been executed successfully.

PROGRAM:

<!--ENABILING & DISABLING STYLE SHEET-->


<html>

<head>

<title>Enabling and Disable Style Sheet</title>

<style>

body

background-color:white

h1

font-size:30pt;

font-weight:bold;

color:red

h2

font-size:18pt;

color:green;

background-color:cyan }

p {

font-size:12pt;

color:purple;

text-indent:30px }

</style>

<script language="java script">

<!--
function on() {

if(document.styleSheets(0).disabled)

document.styleSheets(0).disabled=false;

}else

document.styleSheets(0).disabled=true;

-->

</script>

</head>

<body>

<h1>Title</h1>

<h2>First Paragraph</h2>

<p>This is the first paragraph,it is very short</p>

<h2>Second Paragraph</h2>

<p>This is the second paragraph,it is short too</p>

<div id="state">

<button type="button" onclick="on();">Enable/Disable</button>

</div>

</body>

</html>

OUTPUT:
RESULT:

Thus the java script for enabling and disabling style sheet has been
executed successfully.

PROGRAM:
<!—Accessing Elements by their ID -->

<HTML>

<HEAD>

<TITLE>Accessing elements by their id</TITLE>

<STYLE type="text/css">

span{color:orange; }

.hidden{visibility:hidden;color:green;}

</STYLE>

<SCRIPT language=”javascript”>

function mClick( )

if(document.all.hid.style.visibility="visible")

document all.hid.style.visibility="visible";

document all.hid.style.backgroundColor=”yellow";

else

document.all.hid.style.visibility="hidden";

document.all.hid.style.backgroundColor="white";

</SCRIPT>

</HEAD>

<BODY>

In the month of April there was a lot of <SPAN onClick=’mClick();’>


precipitation</SPAN>

<SPAN class=”hidden" id="hid">

<BR>

<B>Precipitation:</B>

Water that falls on the earths surface as rain, sleet, snow, etc.

</SPAN>

</BODY>

</HTML>

OUTPUT:
RESULT:

Thus the java script for Accessing elements using their ID has been
executed successfully.

PROGRAM:

<!-- WEBSITE FOR COLLEGE-->


HOME PAGE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Untitled Page</title>

</head>

<body bgcolor="#FFFFFF" text="#000000" style="scrollbar-face-


color:#E6E6E6;scrollbar-arrow-color:#000000;scrollbar-3dlight-
color:#E6E6E6;scrollbar-darkshadow-color:#7D7D7D;scrollbar-highlight-
color:#404040;scrollbar-shadow-color:#202020;scrollbar-track-color:#D4D0C8;">

<div id="wb_Shape1"
style="position:absolute;left:562px;top:376px;width:196px;height:122px;z-index:0"
align="center">

<a href="./home.html"><img src="images/img0001.gif" id="Shape1" align="top"


alt="" title="" border="0" width="196" height="122"></a></div>

<div id="wb_Text1"
style="position:absolute;left:372px;top:317px;width:623px;height:42px;z-index:1"
align="left">

<font style="font-size:37px" color="#000000" face="Arial">SRI VENKATESWARA


COLLEGE</font></div>

<div id="wb_Image1"
style="overflow:hidden;position:absolute;left:570px;top:97px;z-index:3"
align="left">

<img src="images/college logo.png" id="Image1" alt="" align="top" border="0"


style="width:144px;height:216px;"></div>

</body>

</html>
ABOUT US:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Untitled Page</title>

<style type="text/css">

div#container

position: absolute;

left: 50%;

top: 50%;

width: 1024px;

height: 786px;

margin-top: -393px;

margin-left: -512px;

</style>

<style type="text/css">

.SlideMenu1_folder

font-family: Arial;

font-size: 11px;

text-transform: uppercase;

background-color: #2569BC;
padding-left: 5px;

width: 100%;

border-style: solid;

border-width: 1;

border-color: #2569BC;

.SlideMenu1_item

font-family: Arial;

font-size: 11px;

background-color: #93BEEB;

padding-left: 5px;

width: 100%;

border-style: solid;

border-width: 1;

border-color: #408FDA;

.SlideMenu1_folder_a

color: #FFFFFF;

font-weight: normal;

text-decoration: none;

.SlideMenu1_folder_a:hover

color: #FFFFFF;
font-weight: normal;

text-decoration: none;

border-color: #408FDA;

.SlideMenu1_item_a

color: #FFFFFF;

font-weight: normal;

text-decoration: none;

.SlideMenu1_item_a:hover

color: #FFFFFF;

font-weight: normal;

text-decoration: none;

</style>

<script type="text/javascript">

<!--

function FindObject(id, doc)

var child, elem;

if(!doc)

doc=document;

if(doc.getElementById)

elem=doc.getElementById(id);
else

if(doc.layers)

child=doc.layers;

else

if(doc.all)

elem=doc.all[id];

if(elem)

return elem;

if(doc.id==id || doc.name==id)

return doc;

if(doc.childNodes)

child=doc.childNodes;

if(child)

for(var i=0; i<child.length; i++)

elem=FindObject(id,child[i]);

if(elem)

return elem;

var frm=doc.forms;

if(frm)

for(var i=0; i<frm.length; i++)

{
var elems=frm[i].elements;

for(var j=0; j<elems.length; j++)

elem=FindObject(id,elems[i]);

if(elem) return elem;

return null;

// -->

</script>

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

<!--

function ToggleExpand(id)

var obj = FindObject(id);

if (!obj)

return false;

if (obj.style.display == "none")

obj.style.display = "";

else
{

obj.style.display = "none";

return false;

//-->

</script>

</head>

<body bgcolor="#FFFFFF" text="#000000" style="scrollbar-face-


color:#E6E6E6;scrollbar-arrow-color:#000000;scrollbar-3dlight-
color:#E6E6E6;scrollbar-darkshadow-color:#7D7D7D;scrollbar-highlight-
color:#404040;scrollbar-shadow-color:#202020;scrollbar-track-color:#D4D0C8;">

<div id="container">

<div id="wb_Image1"
style="overflow:hidden;position:absolute;left:0px;top:101px;z-index:0" align="left">

<img src="images/a.jpg" id="Image1" alt="" align="top" border="0"


style="width:1080px;height:123px;"></div>

<div id="wb_Image2"
style="overflow:hidden;position:absolute;left:37px;top:66px;z-index:1" align="left">

<img src="images/college logo.png" id="Image2" alt="" align="top" border="0"


style="width:144px;height:216px;"></div>

<div id="wb_Text1"
style="position:absolute;left:186px;top:141px;width:554px;height:40px;z-index:2"
align="left">

<font style="font-size:35px" color="#000000" face="Arial">SRI VENKATESWARA


COLLEGE</font></div>

<div id="wb_SlideMenu1"
style="position:absolute;left:2px;top:267px;width:157px;height:342px;z-index:3"
align="left">

<table cellpadding="0" cellspacing="0" width="157">

<tbody>
<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu1_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu1_folder_a" onclick="return ToggleExpand('SlideMenu1_Folder1')"
href="#">MCA</a></td>

</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu1_Folder1">

<tr>

<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">ESCOTERIC</a></td></tr>

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="./COURSES.html">MCA</a></td></tr>
</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu1_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu1_folder_a" onclick="return ToggleExpand('SlideMenu1_Folder2')"
href="#">MBA</a></td>

</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu1_Folder2">

<tr>

<td>

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

<tbody>
<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">ASSOCIATION 1</a></td></tr>

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">ASSOCIATION 2</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu1_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu1_folder_a" onclick="return ToggleExpand('SlideMenu1_Folder3')"
href="#">SPORTS</a></td>

</tr>
</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu1_Folder3">

<tr>

<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">INDOOR</a></td></tr>

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">OUTDOOE</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>
<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu1_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu1_folder_a" onclick="return ToggleExpand('SlideMenu1_Folder4')"
href="#">CAMP</a></td>

</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu1_Folder4">

<tr>

<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">CHALLAKUDI CAMP</a></td></tr>

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">MBA CHALLAKUDI CAMP</a></td></tr>
<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">MCA SIRUVANI CAMP</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu1_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu1_folder_a" onclick="return ToggleExpand('SlideMenu1_Folder5')"
href="#">OOTY</a></td>

</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu1_Folder5">

<tr>
<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">RYLA</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu1_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu1_folder_a" onclick="return ToggleExpand('SlideMenu1_Folder6')"
href="#">COLLEGE ACTIVITIES</a></td>

</tr>
</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu1_Folder6">

<tr>

<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu1_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu1_item_a" href="http://">INAGURAL FUNCTION</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

</table>

</div>
<div id="wb_Shape1"
style="position:absolute;left:34px;top:627px;width:991px;height:8px;z-index:4"
align="center">

<img src="images/img0002.gif" id="Shape1" align="top" alt="" title="" border="0"


width="991" height="8"></div>

<div id="wb_Text2"
style="position:absolute;left:193px;top:299px;width:150px;height:24px;z-index:6"
align="left">

<font style="font-size:21px" color="#000000" face="Arial">ABOUT


US</font></div>

<div id="wb_Text3"
style="position:absolute;left:258px;top:360px;width:529px;height:102px;z-index:7"
align="left">

<font style="font-size:15px" color="#000000" face="Arial">Sri Venkateswara


College of Computer Applications and Management (SVCCAM) was founded in 2007
as a self-financing institution promoted by the Sri Venkateswara Educational and
Charitable Trust. This Trust is headed by the founder Commander K.Velu, a former
Principal of leading Institutions in Coimbatore till Sep 2006 and Mrs.Megala Velu
contributes her service as the Secretary of the Trust.</font></div>

</div>

</body>

</html>

MCA.HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Untitled Page</title>
<meta name="generator" content="WYSIWYG Web Builder -
http://www.wysiwygwebbuilder.com">

<style type="text/css">

.SlideMenu2_folder

font-family: Arial;

font-size: 11px;

text-transform: uppercase;

background-color: #2569BC;

padding-left: 5px;

width: 100%;

border-style: solid;

border-width: 1;

border-color: #2569BC;

.SlideMenu2_item

font-family: Arial;

font-size: 11px;

background-color: #93BEEB;

padding-left: 5px;

width: 100%;

border-style: solid;

border-width: 1;

border-color: #408FDA;

.SlideMenu2_folder_a
{

color: #FFFFFF;

font-weight: normal;

text-decoration: none;

.SlideMenu2_folder_a:hover

color: #FFFFFF;

font-weight: normal;

text-decoration: none;

border-color: #408FDA;

.SlideMenu2_item_a

color: #FFFFFF;

font-weight: normal;

text-decoration: none;

.SlideMenu2_item_a:hover

color: #FFFFFF;

font-weight: normal;

text-decoration: none;

</style>

<script type="text/javascript">
<!--

function FindObject(id, doc)

var child, elem;

if(!doc)

doc=document;

if(doc.getElementById)

elem=doc.getElementById(id);

else

if(doc.layers)

child=doc.layers;

else

if(doc.all)

elem=doc.all[id];

if(elem)

return elem;

if(doc.id==id || doc.name==id)

return doc;

if(doc.childNodes)

child=doc.childNodes;

if(child)

for(var i=0; i<child.length; i++)

elem=FindObject(id,child[i]);

if(elem)
return elem;

var frm=doc.forms;

if(frm)

for(var i=0; i<frm.length; i++)

var elems=frm[i].elements;

for(var j=0; j<elems.length; j++)

elem=FindObject(id,elems[i]);

if(elem) return elem;

return null;

// -->

</script>

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

<!--

function ToggleExpand(id)

var obj = FindObject(id);

if (!obj)
{

return false;

if (obj.style.display == "none")

obj.style.display = "";

else

obj.style.display = "none";

return false;

//-->

</script>

</head>

<body bgcolor="#FFFFFF" text="#000000" style="scrollbar-face-


color:#E6E6E6;scrollbar-arrow-color:#000000;scrollbar-3dlight-
color:#E6E6E6;scrollbar-darkshadow-color:#7D7D7D;scrollbar-highlight-
color:#404040;scrollbar-shadow-color:#202020;scrollbar-track-color:#D4D0C8;">

<div id="wb_Image2"
style="overflow:hidden;position:absolute;left:0px;top:101px;z-index:1" align="left">

<img src="images/a.jpg" id="Image2" alt="" align="top" border="0"


style="width:1080px;height:123px;"></div>

<div id="wb_Image1"
style="overflow:hidden;position:absolute;left:37px;top:66px;z-index:2" align="left">

<img src="images/college logo.png" id="Image1" alt="" align="top" border="0"


style="width:144px;height:216px;"></div>
<div id="wb_Text2"
style="position:absolute;left:186px;top:141px;width:554px;height:40px;z-index:3"
align="left">

<font style="font-size:35px" color="#000000" face="Arial">SRI VENKATESWARA


COLLEGE</font></div>

<div id="wb_SlideMenu2"
style="position:absolute;left:2px;top:267px;width:157px;height:342px;z-index:4"
align="left">

<table cellpadding="0" cellspacing="0" width="157">

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu2_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu2_folder_a" onclick="return ToggleExpand('SlideMenu2_Folder1')"
href="#">MCA</a></td>

</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu2_Folder1">

<tr>

<td>

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

<tbody>

<tr>
<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">ESCOTERIC</a></td></tr>

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">MCA</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu2_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu2_folder_a" onclick="return ToggleExpand('SlideMenu2_Folder2')"
href="#">MBA</a></td>

</tr>

</table>
</td>

</tr>

</tbody>

<tbody id="SlideMenu2_Folder2">

<tr>

<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">ASSOCIATION 1</a></td></tr>

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">ASSOCIATION 2</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>
<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu2_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu2_folder_a" onclick="return ToggleExpand('SlideMenu2_Folder3')"
href="#">SPORTS</a></td>

</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu2_Folder3">

<tr>

<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">INDOOR</a></td></tr>

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">OUTDOOE</a></td></tr>

</table>
</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu2_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu2_folder_a" onclick="return ToggleExpand('SlideMenu2_Folder4')"
href="#">CAMP</a></td>

</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu2_Folder4">

<tr>

<td>

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

<tbody>

<tr>
<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">CHALLAKUDI CAMP</a></td></tr>

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">MBA CHALLAKUDI CAMP</a></td></tr>

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">MCA SIRUVANI CAMP</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu2_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu2_folder_a" onclick="return ToggleExpand('SlideMenu2_Folder5')"
href="#">OOTY</a></td>
</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu2_Folder5">

<tr>

<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">RYLA</a></td></tr>

</table>

</td>

</tr>

</tbody>

</table>

</td>

</tr>

</tbody>

<tbody>

<tr>
<td>

<table width="100%" cellspacing="1">

<tr>

<td class="SlideMenu2_folder"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#2569BC'"><a
class="SlideMenu2_folder_a" onclick="return ToggleExpand('SlideMenu2_Folder6')"
href="#">COLLEGE ACTIVITIES</a></td>

</tr>

</table>

</td>

</tr>

</tbody>

<tbody id="SlideMenu2_Folder6">

<tr>

<td>

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

<tbody>

<tr>

<td>

<table width="100%" cellspacing="1">

<tr><td class="SlideMenu2_item"
onMouseOver="this.style.backgroundColor='#408FDA'"
onMouseOut="this.style.backgroundColor='#93BEEB'"><a
class="SlideMenu2_item_a" href="http://">INAGURAL FUNCTION</a></td></tr>

</table>

</td>

</tr>

</tbody>
</table>

</td>

</tr>

</tbody>

</table>

</div>

<div id="wb_Shape2"
style="position:absolute;left:34px;top:627px;width:991px;height:8px;z-index:5"
align="center">

<img src="images/img0003.gif" id="Shape2" align="top" alt="" title="" border="0"


width="991" height="8"></div>

<div id="wb_Text1"
style="position:absolute;left:211px;top:289px;width:150px;height:19px;z-index:6"
align="left">

<font style="font-size:16px" color="#000000"


face="Arial"><b>COURSES</b></font></div>

<div id="wb_Text3"
style="position:absolute;left:271px;top:327px;width:574px;height:255px;z-index:7"
align="left">

<font style="font-size:15px" color="#000000" face="Arial">MCA @ Sri


Venkateswara College of Computer Applications and Management is established
with the objective of producing talented software engineers.<br>

<br>

The Department is headed by Dr.M.Arthanari who has thirty four years of experience
in the educational field. Previously he has served as a principal of Erode Arts College
(Autonomous). The department also has eight faculty members in different areas of
specialization like database management systems, network security, e-commerce,
visual programming and all languages.<br>

<br>

MBA @ Sri Venkateswara College of Computer Applications and Management is


established with the objective of producing students of managerial excellence.<br>

<br>
The department has six faculty members in different areas of specialization like
Marketing, Human Resource Management, Financial Management, Production &amp;
Quality Management and Portfolio Management.</font></div>

</body>

</html>

OUTPUT:
RESULT:

Thus the website has been developed successfully using HTML and DHTML
tags.
PROGRAM:

<!—FTP DOWLOADING--> FTPS.JAVA

import java.io.*;

import java.net.*;

class ftps

public static void main(String args[])throws IOException

Socket s=null;

ServerSocket ss=null;

DataOutputStream sso=null;

DataInputStream sin=null;

ss=new ServerSocket(55555);

System.out.println("Waiting") ;

s=ss.accept();

sso=new DataOutputStream(s.getOutputStream());

sin=new DataInputStream(s.getInputStream());

String s1;

s1=sin.readLine();

FileInputStream fos=new FileInputStream(s1);

int str;

while((str=fos.read())!=-1)

sso.writeBytes(""+(char)str);

System.out.println("File has been sent successfully");

sso.close();

s.close();

}
FTPC.JAVA

import java.io.*;

import java.net.*;

public class ftpc

public static void main(String args[])throws IOException

{ Socket s=null;

DataInputStream si=null;

s=new Socket(InetAddress.getLocalHost(),55555);

si=new DataInputStream(s.getInputStream());

DataInputStream inp=new DataInputStream(System.in);

DataOutputStream so=new DataOutputStream(s.getOutputStream());

String str;

System.out.println("\n Enter the filename(path) : ");

str=inp.readLine();

so.writeBytes(str);

so.writeBytes("\n");

FileOutputStream fos=new FileOutputStream("abc1.txt");

int str1;

System.out.println("Transferring the file :"+str+" \n");

while((str1=si.read())!=-1)

{ fos.write((char)str1);

System.out.print((char)str1); }

System.out.println("\n File received successfully");

si.close(); } }

OUTPUT:
RESULT:

Thus the ftp program for downloading has been executed and file transferred
successfully.

PROGRAM:
<!—ftp uploading--> ftp server

import java.io.*;

import java.net.*;

class ftpus

public static void main(String args[])throws IOException

Socket s=null;

ServerSocket ss=null;

DataOutputStream sso=null;

DataInputStream sin=null;

ss=new ServerSocket(55555);

System.out.println("Waiting") ;

s=ss.accept();

sso=new DataOutputStream(s.getOutputStream());

sin=new DataInputStream(s.getInputStream());

FileOutputStream fos=new FileOutputStream("abc1.txt");

int str1;

while((str1=sin.read())!=-1)

fos.write((char)str1);

System.out.print((char)str1);

sso.close(); s.close(); }}

ftp client:

import java.io.*;
import java.net.*;

public class ftpuc

public static void main(String args[])throws IOException

Socket s=null;

DataInputStream si=null;

s=new Socket(InetAddress.getLocalHost(),55555);

si=new DataInputStream(s.getInputStream());

DataInputStream inp=new DataInputStream(System.in);

DataOutputStream so=new DataOutputStream(s.getOutputStream());

String str;

System.out.println("\n Enter the filename(path) : ");

str=inp.readLine();

int i;

FileInputStream fos=new FileInputStream(str);

while((i=fos.read())!=-1)

so.writeBytes(""+(char)i);

si.close();

OUTPUT:
RESULT:

Thus the program has been executed successfully and the result is displayed.

PROGRAM:

<!--Student Database Connectivity-->


import java.sql.*;

import java.io.*;

import java.lang.*;

public class mark

public String name, rno;

public int ma1,ma2,ma3,ma4,ma5,tot,avg;

private void getdata() throws IOException, SQLException

try

DataInputStream in = new DataInputStream(System.in);

System.out.println("Creation Details");

System.out.print("Enter the Name");

name = in.readLine();

System.out.print("Enter the rollno:");

rno = in.readLine();

System.out.print("nter the mark 1");

ma1 = Integer.parseInt(in.readLine());

System.out.print("Enter the mark 2");

ma2 = Integer.parseInt(in.readLine());

System.out.print("Enter the mark 3");

ma3 = Integer.parseInt(in.readLine());

System.out.print("Enter the mark 4");


ma4 = Integer.parseInt(in.readLine());

System.out.print("Enter the mark 5");

ma5 = Integer.parseInt(in.readLine());

catch(Exception e)

System.out.println(e);

public void create() throws IOException, SQLException

Connection con;

Statement st;

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con= DriverManager.getConnection("jdbc:odbc:mark1","","");

st = con.createStatement();

DataInputStream in = new DataInputStream(System.in);

getdata();

tot = ma1 + ma2 + ma3 + ma4+ ma5;

avg = tot/5;

String query = "insert into mark


values('"+name+"','"+rno+"',"+ma1+","+ma2+","+ma3+","+ma4+","+ma5+","+t
ot+","+avg+");";

st.execute(query);
st.close();

con.close();

catch(Exception e)

System.out.println("This roll no : "+rno+" is already created");

void cancel()

Connection con;

Statement st;

ResultSet rs;

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con= DriverManager.getConnection("jdbc:odbc:mark1","","");

st = con.createStatement();

DataInputStream in = new DataInputStream(System.in);

System.out.print("enter roll no:");

rno = in.readLine();

String query1 = "delete * from mark where rno = '"+rno+"' ";

st.executeUpdate(query1);

System.out.println("The acc no: "+rno+" is canceled");

st.close();
}

catch(Exception ex)

System.out.println("Exception :"+ex);

void read()

Connection con;

Statement st;

ResultSet rs;

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con= DriverManager.getConnection("jdbc:odbc:mark1","","");

st = con.createStatement();

String query = "select * from mark order by rno;";

rs = st.executeQuery(query);

System.out.println("\n\tName\tRollno\tmark1\tmark2\tmark3\tmark4\tmark5\tTotal\t
Average");

while(rs.next())

name = rs.getString("name");

rno = rs.getString("rno");

ma1 = Integer.parseInt(rs.getString("ma1"));
ma2 = Integer.parseInt(rs.getString("ma2"));

ma3 = Integer.parseInt(rs.getString("ma3"));

ma4 = Integer.parseInt(rs.getString("ma4"));

ma5 = Integer.parseInt(rs.getString("ma5"));

tot = Integer.parseInt(rs.getString("tot"));

avg = Integer.parseInt(rs.getString("avg"));

System.out.println('\t'+name+'\t'+rno+'\t'+ma1+'\t'+ma2+'\t'+ma3+'\t'+ma4+'\t'
+ma5+'\t'+tot+'\t'+avg);

rs.close();

st.close();

con.close();

catch(Exception ex)

System.out.println("Exception:"+ex);

void update()

Connection con;

Statement st;

ResultSet rs;

try
{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con= DriverManager.getConnection("jdbc:odbc:mark1","","");

st = con.createStatement();

DataInputStream in = new DataInputStream(System.in);

System.out.print("enter the name");

name = in.readLine();

System.out.print("Enter the rollno:");

rno = in.readLine();

String query = "update mark set name = '"+name+"',rno = '"+rno+"' where no =


'"+rno+"'";

st.executeUpdate(query);

System.out.println("The roll no"+rno+" is Updated");

st.close();

con.close();

catch(Exception e)

System.out.println("Exception"+e);

public static void main(String[] args) throws IOException

DataInputStream in = new DataInputStream(System.in);

try
{

int choice = 0;

String flag = "y";

mark obj = new mark();

while(flag=="y")

System.out.println("1.creation");

System.out.println("2.cancelation");

System.out.println("3.Updation");

System.out.println("4.Display");

System.out.println("Type Other Keys to Exit");

System.out.println("Enter the Choice");

choice = Integer.parseInt(in.readLine());

switch(choice)

case 1:

obj.create();

break;

case 2:

obj.cancel();

break;

case 3:

obj.update();

break;
case 4:

obj.read();

break;

default:

System.exit(0);

catch(Exception e)

{System.out.println("Exception"+e);

OUTPUT:
RESULT:

Thus the program has been executed successfully and the result is displayed.
PROGRAM:

<!--DATABASE CONNECTIVITY-->

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

import java.sql.*;

public class ProductInfo extends JFrame implements ActionListener

/*Declare the variables to create the application interface for the Product
Information application*/

JLabel heading, id, desc, rate, quantity, unit_of_msr,

empty_label,error;

JTextField idField, descField, rateField, quantityField,

unit_of_msrField;

JButton insert, update, delete, clear, exit;

GridBagLayout gbl;

GridBagConstraints gbc;

JComboBox idCombo;

Connection con;

PreparedStatement stat;

Statement stmt;

ResultSet rs;

Font f;

JPanel jp1;

/*Define the constructor for the Product Information application*/

public ProductInfo()

{
setTitle("Product Information");

setSize(600, 300);

/*Register the WindowListener interface to define the windowClosing() method*/

addWindowListener(new WindowAdapter()

public void windowClosing(WindowEvent we)

System.exit(0);

});

/*Initialize the JPanel object*/

jp1=new JPanel();

/*Set the BorderLayout as the layout manager*/

getContentPane().setLayout(new BorderLayout());

/*Initialize the GridBagLayout object*/

gbl = new GridBagLayout();

/*Initialize the GridBagConstraints object*/

gbc = new GridBagConstraints();

jp1.setLayout(gbl);

f = new Font("Monospaced", Font.BOLD, 24);

gbc.gridx = 1;

gbc.gridy = 0;

gbc.gridwidth = 3;

/*Initialize the JLabel object to set the caption for the application*/

heading = new JLabel("Product Information");

/*Set the font for the caption*/


heading.setFont(f);

/*Add the caption to the Panel*/

jp1.add( heading, gbc);

gbc.gridx = 0;

gbc.gridy = 1;

gbc.gridwidth = 5;

empty_label = new JLabel("");

empty_label.setFont(f);

jp1.add( empty_label, gbc);

gbc.gridx = 1;

gbc.gridy = 2;

gbc.gridwidth = 1;

/*Initialize the id JLabel object*/

id = new JLabel("ID", SwingConstants.LEFT);

/*Add the label, id to the panel*/

jp1.add( id, gbc);

gbc.gridx = 2;

gbc.gridy = 2;

gbc.gridwidth = 1;

/*Initialize the idField JTextField object*/

idField = new JTextField(10);

/*Add the JtextField object, idField to the panel*/

jp1.add( idField, gbc);

gbc.gridx = 3;

gbc.gridy = 2;

gbc.gridwidth = 1;
/*Initialize the idCombo JComboBox object*/

idCombo = new JComboBox();

/*Set the editable option of idCombo object to false*/

idCombo.setEditable(false);

/*Add the JComboBox object, idCombo to the panel*/

jp1.add(idCombo, gbc);

gbc.gridx = 1;

gbc.gridy = 3;

gbc.gridwidth = 1;

/*Initialize the desc JLabel object*/

desc = new JLabel("Description", SwingConstants.LEFT);

/*Add the desc JLabel object to the panel*/

jp1.add( desc, gbc);

gbc.gridx = 2;

gbc.gridy = 3;

gbc.gridwidth = 2;

/*Initialize the descField JTextField object*/

descField = new JTextField(20);

/*Add the descField JTextField object to the panel*/

jp1.add( descField, gbc);

gbc.gridx = 1;

gbc.gridy = 4;

gbc.gridwidth = 1;

/*Initialize the rate JLabel object*/

rate = new JLabel("Rate", SwingConstants.LEFT);

/*Add the rate JLabel object to the panel*/


jp1.add( rate, gbc);

gbc.gridx = 2;

gbc.gridy = 4;

gbc.gridwidth = 2;

/*Initialize the rateField JTextField object*/

rateField = new JTextField(20);

/*Add the rateField object to panel*/

jp1.add( rateField, gbc);

gbc.gridx = 1;

gbc.gridy = 5;

gbc.gridwidth = 1;

/*Initialize the quantity JTextField object*/

quantity = new JLabel("Quantity", SwingConstants.LEFT);

/*Add the quantity object to panel*/

jp1.add( quantity, gbc);

gbc.gridx = 2;

gbc.gridy = 5;

gbc.gridwidth = 2;

/*Initialize the quantityField JTextField object*/

quantityField = new JTextField(20);

/*Add the quantityField object to panel*/

jp1.add( quantityField, gbc);

gbc.gridx = 1;

gbc.gridy = 6;

gbc.gridwidth = 1;

/*Initialize the unit_of_msr JLabel object*/


unit_of_msr = new JLabel("Unit of Measurement ",SwingConstants.LEFT);

/*Add the unit_of_msr object to panel*/

jp1.add( unit_of_msr, gbc);

gbc.gridx = 2;

gbc.gridy = 6;

gbc.gridwidth = 2;

/*Initialize the unit_of_msrField JTextField object*/

unit_of_msrField = new JTextField(20);

/*Add the unit_of_msrField object to panel*/

jp1.add( unit_of_msrField, gbc);

gbc.gridx = 0;

gbc.gridy = 7;

gbc.gridwidth = 1;

/*Initialize the insert JButton object*/

insert = new JButton("Insert");

/*Register ActionListener on insert JButton object*/

insert.addActionListener(this);

/*Add the insert object to the panel*/

jp1.add( insert, gbc);

gbc.gridx = 1;

gbc.gridy = 7;

gbc.gridwidth = 1;

/*Initialize the update JButton object*/

update = new JButton("Update");

/*Register ActionListener on update JButton object*/

update.addActionListener(this);
/*Add update object to panel*/

jp1.add( update, gbc);

gbc.gridx = 2;

gbc.gridy = 7;

gbc.gridwidth = 1;

/*Initialize the delete JButton object*/

delete = new JButton("Delete");

/*Register ActionListener on delete JButton object*/

delete.addActionListener(this);

/*Add delete object to panel*/

jp1.add( delete, gbc);

gbc.gridx = 3;

gbc.gridy = 7;

gbc.gridwidth = 1;

/*Initialize the clear JButton object*/

clear = new JButton("Clear");

/*Register ActionListener on clear JButton object*/

clear.addActionListener(this);

/*Add the clear JButton object to panel*/

jp1.add( clear, gbc);

gbc.gridx = 4;

gbc.gridy = 7;

gbc.gridwidth = 1;

/*Initialize the exit JButton object*/

exit = new JButton("Exit");

/*Register ActionListener on exit JButton object*/


exit.addActionListener(this);

/*Add the exit JButton object to panel*/

jp1.add( exit, gbc);

/*Initialize the error JLabel object*/

error = new JLabel("");

/*Add jp1 JPanel object in the center of the contentpane*/

getContentPane().add(jp1,"Center");

/*Add error JLabel object to the contentpane*/

getContentPane().add(error,"South");

try

/*Initialize and load JDBC-ODBC bridge driver*/

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

/*Connect to a data source*/

con = DriverManager.getConnection("jdbc:odbc:qw");

/*Create a Statement object*/

stmt = con.createStatement();

/*Retrieve the rows from the product table and store them in the result set object
rs*/

rs = stmt.executeQuery("SELECT p_id FROM product");

/*Display the p_id values in the idCombo object*/

while (rs.next())

idCombo.addItem(Integer.toString(rs.getInt(1))); }

/*Close the Connection object*/

con.close();

}
catch(Exception e)

System.out.println("Error : "+e);

idCombo.addActionListener(this);

public void actionPerformed(ActionEvent ae)

if(ae.getActionCommand() == "Exit")

/*Terminate the execution of the application*/

System.exit(0);

if(ae.getActionCommand() == "Delete")

/*Delete the selected row from the product table*/

try

/*Initialize the con Connection object */

con = DriverManager.getConnection("jdbc:odbc:qw");

/*Initialize the stat PreparedStatement object to delete a row*/

stat = con.prepareStatement("DELETE from Product WHERE p_id = ?");

String selected_id = idCombo.getSelectedItem().toString();

int id = Integer.parseInt(selected_id);

stat.setInt(1, id);

/*Execute the query*/

stat.executeUpdate();

/*Close the connection*/


con.close();

/*Remove ActionListener from idCombo JComboBox object*/

idCombo.removeActionListener(this);

/*Initialize the con Connection object*/

con = DriverManager.getConnection("jdbc:odbc:qw");

/*Initialize the stmt Statement object*/

stmt = con.createStatement();

/*Store all the rows of the product table in the rs ResultSet object*/

rs = stmt.executeQuery("SELECT p_id FROM product");

/*Remove all the elements from the idCombo JcomboBox object*/

idCombo.removeAllItems();

while (rs.next())

idCombo.addItem(Integer.toString(rs.getInt(1)));

con.close();

idCombo.addActionListener(this);

idField.setText("");

descField.setText("");

rateField.setText("");

quantityField.setText("");

unit_of_msrField.setText("");

error.setText("Row Deleted");

catch(Exception e)

System.out.println("Error " + e );

error.setText("Row cannot be deleted");


}

if(ae.getActionCommand() == "Insert")

//Insert a row in the product table

try

con = DriverManager.getConnection("jdbc:odbc:qw");

stat = con.prepareStatement("INSERT INTO Product VALUES(?, ?, ?, ?, ?)");

String id = idField.getText();

String description = descField.getText();

String rate = rateField.getText();

String quantity = quantityField.getText();

String unit_of_msr = unit_of_msrField.getText();

stat.setInt(1, Integer.parseInt(id));

stat.setString(2, description);

stat.setDouble(3, Double.parseDouble(rate));

stat.setInt(4, Integer.parseInt(quantity));

stat.setString(5, unit_of_msr);

/*Execute the INSERT statement*/

stat.executeUpdate();

con.close();

idCombo.removeActionListener(this);

con = DriverManager.getConnection("jdbc:odbc:qw");

stmt = con.createStatement();

rs = stmt.executeQuery("SELECT p_id FROM product");


idCombo.removeAllItems();

while (rs.next())

/*Refresh the id values in the idCombo JComboBox after inserting a new row*/

idCombo.addItem(Integer.toString(rs.getInt(1)));

con.close();

idCombo.addActionListener(this);

error.setText("Row Inserted");

catch(Exception e)

System.out.println("Error1 "+e);

error.setText("Row cannot be inserted");

if(ae.getSource() == idCombo)

/*Display the row corresponding the id selected in the idCombo combobox*/

try

con = DriverManager.getConnection("jdbc:odbc:qw");

String selected_id = idCombo.getSelectedItem().toString(); int id =


Integer.parseInt(selected_id);

stmt = con.createStatement();

rs = stmt.executeQuery("SELECT p_desc, p_rate, p_qty, unit_of_msr FROM product


WHERE p_id = " + id);

rs.next();

idField.setText(selected_id);
descField.setText(rs.getString(1));

rateField.setText(Double.toString(rs.getDouble(2)));

quantityField.setText(Integer.toString(rs.getInt(3)));
unit_of_msrField.setText(rs.getString(4));

con.close();

catch(Exception e)

System.out.println("Error " + e);

if(ae.getActionCommand()=="Update")

try

con = DriverManager.getConnection("jdbc:odbc:qw");

/*Initialize the stat PreparedStatement object to update a row in the product table*/

stat = con.prepareStatement("UPDATE Product SET p_desc = ?, p_rate = ?, p_qty =


?, unit_of_msr = ? where p_id = ?");

String description = descField.getText();

String rate = rateField.getText();

String quantity = quantityField.getText();

String unit_of_msr = unit_of_msrField.getText();

String id_selected = idField.getText();

int id = Integer.parseInt(id_selected);

stat.setString(1, description);

stat.setDouble(2, Double.parseDouble(rate));
stat.setInt(3, Integer.parseInt(quantity));

stat.setString(4, unit_of_msr);

stat.setInt(5, id);

/* Execute the UPDATE statement*/

stat.executeUpdate();

con.close();

error.setText("Row Updated");

catch(Exception e)

System.out.println("Error " + e );

error.setText("Cannot update the row");

if(ae.getActionCommand() == "Clear")

/*Clear the contents of all the fields*/

idField.setText("");

descField.setText("");

rateField.setText("");

quantityField.setText("");

unit_of_msrField.setText("");

public static void main(String args[])

{
ProductInfo p = new ProductInfo();

p.show();

OUTPUT:
RESULT:

Thus the program has been executed successfully and the result is displayed.

PROGRAM:

<!—jsp-->
Welcome page .html

<html>

<body>

<form name="f1" action="GetAuthorName.jsp">

<br>

<font size=4 face="Verdana" color="GREEN">

</font>

<h2><center>Connecting Database with JavaBean</center></h2>

<br>

<table cellspacing=8 cellpadding=8 bgcolor=GRAY colspan=2 rowspan=2


align="center" width="361" height="62">

<tr>

<td width="224" height="1"><b><font face="Verdana" color="#FFFFFF"


size="3">Author Id:</font></b></td>

<td width="261" height="1"><font size=4 face="Verdana"


color=#008000><input type=text name="authorId" size="26" ></font>

</tr>

<tr>

<td width="224" height="1"><b><font face="Verdana" color="#FFFFFF"


size="3">URL:</font></b></td>

<td width="261" height="1"><font size=4 face="Verdana"


color=#008000><input type=text name="url" size="26" ></font>

</tr>

<tr>

<td width="224" height="1"><b><font face="Verdana" color="#FFFFFF"


size="3">Driver Name:</font></b></td>

<td width="261" height="1"><font size=4 face="Verdana"


color=#008000><input type=text name="driverName" size="26" ></font>

</tr>
<tr>

<td><input type="submit" value="Go"></td>

</tr>

</table>

<br>

</form>

</body>

</html>

GET AUTHORNAME.JSP:

<%-- Import the package --%>

<%@ page import ="java.util.*" %>

<%@ page import = "test.FindAuthor" %>

<html>

<head>

<title> JSP and JavaBean </title>

<font size=4 face="Verdana" color=#112244>

<%-- Create an instance of FindAuthor class --%>

<jsp:useBean id="FA" scope="application" class="test.FindAuthor" />

<%-- Set the value of various attribute, such as authorId, url, and driverName --%>

<jsp:setProperty name="FA" property="*" />

<body>
<%-- The details about the author, <jsp:getProperty name="FA"
property="authorName"/> is:<BR> --%>

<%

/* Create an instance of type of Vector and invoking the function getResult()


to return the result set*/

Vector v = (Vector)FA.getResult();

Enumeration enum = v.elements();

/* Prints the elements in the vector variable */

while(enum.hasMoreElements())

out.println("Author Name:"+enum.nextElement());

%>

<br>

<%

out.println("Address:"+enum.nextElement());

%><br><%

out.println("City:"+enum.nextElement());

%><br><%

out.println("State:"+enum.nextElement());

%><br><%

out.println("ZIP:"+enum.nextElement());

%></body></head>

OUTPUT:
RESULT:

Thus the JSP program has been executed successfully and the result is
displayed.

PROGRAM:

<!-- Time and Date using arrays-->

<html>

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

var d= new Date();

var weekday= new Array("Sunday","Monday","Tuesday","Wednesday",

"thursday","friday","saturday");

var monthname=new Array("jan","feb","mar","apr","may","jun",

"jul","aug","sep","oct","nov","dec");

document.write(weekday[d.getDay()]+" ");

document.write(monthname[d.getMonth()]+" ");

document.write(d.getFullYear());

</script>

</body>

</html>

OUTPUT:
RESULT:

Thus the program has been successfully executed and the result is displayed.