Wednesday, January 30, 2013


MOCK ONLINE IT EXAM
(2012-2013)

All  XII - IT students are informed that, your MOCK ONLINE  TEST is held on 31 st January.
So please meet Mr Waykaskar Sir to get the schedule of the mock exam. This exam is compulsory for all students. 

Friday, January 11, 2013

INDEX

SR NO
DATE
TITLE OF EXPERIMENT
PAGE NO
SIGN
1
17/07/2012
Creation of web site for college/ State


2
24/07/2012
Creation of web site for a Theme “Save Earth Environment”


3
18/09/2012
Creation of a Website with CSS


4
25/09/2012
Creation of a Website with Frames and CSS


5
07/08/2012
Hyperlinks on a Web Page using Client Side Image Mapping


6
14/08/2012
Hyperlinks on a Web Page using Server Side Image Mapping
If you don't have the code then write in Index only

7
28/08/2012
Use of Audio and Animation on Web Pages


8
04/09/2012
Use of Video on Web Pages with control and without control


9
11/09/2012
Cross Browser Testing and Differences in Rendering


10
04/12/2012
ASP code to display a report of client IP Address, Browser etc.


11
11/12/2012
ASP code to display Server Side Time and Client Side Time.


12
18/12/2012
ASP code to calculate the number of days a person has lived on basis of the Date of Birth.


13
24/12/2012
ASP code to display number of visits to the web site


14
24/12/2012
ASP code to display number of votes cast with hit counter


15
02/01/2013
ASP code that accepts data and puts the same Into a Database.


16
09/10/2012
Event Driven Client Side Script with frames


17
23/10/2012
Event Driven Client side script for color animation with button & without button


18
30/10/2012
Use of JavaScript for Validation of Username and Password



Monday, January 7, 2013


Report of client ip address,portno,etc
<% @ language="vbscript" %>
<html>
<table border="1" bordercolor="black" align="center"heigth="400" width="600">
<tr>
<th>
<body >
<font face="Garamond" color="black">
<%
dim ipAdd,portNo,sersoft,browserType
ipAdd=Request.servervariables("LOCAL_ADDR")
portNo=Request.servervariables("SERVER_PORT")
sersoft=Request.servervariables("SERVER_SOFTWARE")
browserType=Request.servervariables ("HTTP_USER_AGENT")
            response.write ("THE IPADDRESS OF THE REMOTE HOST MAKING REQUEST")
            response.write ipAdd
            response.write "<br>"
            response.write("THE PORT NUMBER TO THE REQUEST WAS SENT :")
            response.write portNo
            response.write "<br>"
            response.write("THE NAME AND VERSION OF THE SERVER SOFTWARE")
            response.write sersoft
            response.write "<br>"
            response.write ("BROWSER NAME ")
            response.write browserType
            response.write "<br>"
%>
</table>
</body>
</html>



Server and Client Date –Time
<html><head></head><body>
<marquee behavior="alternate">
<font face="boca racon icg" color="Blue"><H2>SERVER SIDE INFORMATION IS AS FOLLOWS</font></H2></marquee>
<% dim dt,tm %>
            <% dt=Date()
            tm=Time()        %>
            <center>The current date of the server is <% = dt %><br>
            The current time of the server is <% = tm %><br>
The week day name is <%Response.write weekdayname(weekday(dt))%>
            <br>The month name is <%Response.write monthname(month(dt))%>
            <br><br><HR color="indigo" size="20">         </center>         <br><br>
<font face="garamond" color="green"><marquee behavior="alternate">
<H2>CLIENT SIDE INFORMATION IS AS FOLLOWS</H2></marquee></font>
<center>
<script language="vbscript">
dim cdt,ctm
cdt=Date()
ctm=Time()
document.write "<br>"
document.write "The current date of the client is " & cdt
document.write "<br>"
document.write "The current time of the client is " & ctm
document.write "<br>"
document.write "The Week day name of the client is " & weekdayname(weekday(cdt))
document.write "<br>"
document.write "The Month name of the client is " & monthname(month(cdt))
document.write "Time difference between SERVER and ClIENT is " & datediff("S","<%=tm%>", ctm) & "Seconds"
document.close
</script></center></body></html>




Days Calculation
<html><head><title>GOOD LUCK</title></head>
<body text="green"  bgcolor="plum">
<b><form name="frmdob" action="p_day.asp" method="post">
<center><br><br><br><br>
Enter name : <input id=text1 name="txtnme" size="20" ><br>
Enter date of birth: <input id=text2 name="txtDOB" size="20" ><br> 
<input id=submit1 name=submit1 type=submit value=submit>
<input id=reset1 name=reset1 type=reset value=reset>
</form></body></html>

ASP
<%@ language=VBscript%> 
<html><head><title>Result</title></head>
<body bgcolor="White" text="Blue"><br><br>
<% dim userdt,dt,idays,t
userdt=Request.Form("txtDOB")
dt=Date()
t=Time()
idays=datediff("d",cDate(userdt),dt)
dim imon
imon=datediff("m",cDate(userdt),dt)
dim iyr
iyr=datediff("yyyy",cDate(userdt),dt)
dim nm
nm=Request.Form("txtnme")%><center><b>
<font face="book antiqua" size=4 color=red><I>
<table width=100% border=1 bordercolor=Blueviolet align=center cellpadding=0 cellspacing=0><tr align=center><td>
<font face="book antiqua" size=4>
<% response.write("You have lived for precious ")%>
<font face="monotype corciva" size=4 color=red>
<%response.write iyr%></font>
<% response.write(" years")%><br>
<% response.write("You have lived for precious ")%>
<font face="monotype corciva" size=4 color=red>
<%response.write imon%></font>
<% response.write(" months")%><br>
<%response.write("You have lived on this beautiful earth for precious ")%>
<font face="monotype corciva" size=4 color=red>
<%response.write idays%></font>
<% response.write(" days") %><hr></body></html>



 User name and password validation
 
<html>
<head>
<title>USERNAME AND PASSWORD</title>
<script language="javascript">
            function subform()
            {
                        if(nam() && ispass())
                        {
                        alert("VALID USERNAME AND PASSWORD");
                        return true;
                        }
                        else
                        {
                        return false;
                        }
            }
           
            function nam()
                        {
            var str
            str=document.test.un.value;
                        if(str=="")
                        {
                        alert("ENTER USERNAME");
                        document.test.un.focus();
                        return false;
                        }
                                    if(str!="" && str.length<6)
                                    {
                        alert("USERNAME SHOULD BE MORE THAN 6 CHARACTERS");
                                    document.test.un.value="";
                                    document.test.un.focus();
                                    return false;
                                    }
                                                for(var i=0;i<str.length;i++)
                                                {var ch
                                                ch=str.charAt(i);
                                    if(((ch<'a'||'z'<ch)&&(ch<'A'||'Z'<ch)&&(ch!='' && ch!='-')))
                                                {
                                    alert("USERNAME ACCEPT ONLY LETTER AND SPACE");
                                                document.test.un.focus();
                                                document.test.un.value=""
                                                return false;
                                                }
                                                else
                                                {                                  return true;
                                                }
                                                }
}                                             
function ispass()
{
var str1=document.test.pass.value;
            if(str1=="")
            {
                        alert("ENTER PASSWORD");
                        document.test.pass.focus();
                        return false;
            }
            if(str1=="student")
            {
            return true;
            }
            else
            {
            alert("INVALID PASSWORD");
            document.test.pass.value="";
            document.test.pass.focus();
            return false;
            }
}
</script>
</head>
<body bgcolor="rgb(111,162,234)">
<marquee behaviour="scroll"><font face="monotype corsiva" color="indigo" size="30"><b>WELCOME </b></font></marquee>
<form name=test>
<hr color="white" size="15">
<h2><font color="white" face="Boca Raton ICG" size="5">ENTER YOUR NAME</h2>
<input type="text" name="un" size="15"><br>
<p>ENTER PASSWORD</p>
<input type="password" name="pass" size="15"><br>
<p>
<input type="button" value="CHECK USERNAME AND PASSWORD" name="sub" onClick=subform();>
<input type="reset" value="RESET">
<hr color="white" size="15">
</font></form></body></html>


Creation of website with Frames and  CSS
Frame File
<html>
<head>
<title>index</title>
</head>
<frameset rows=30%,45%,*>
<frame name="f1"  src="top.htm">
<frameset cols=30%,70%>
<frame name="f2" src="left.htm">
<frame  name="f3" src="right1.htm">
</frameset>
<frame name="f4" src="bottom.htm">
</frameset>
</html>

<html>
<head>
<title>this is a top page</title>
<style  type="text/css">
<!--
body{background-color:"pink";};
h1{font-family:monotype corsiva;color:brown;width:300;;position:absolute;left:400px};
b{font-family:monotype corsiva;color:"black";};
-->
</style>
</head>
<body>
<h1>Welcome to the  top page</h1>
<br>
<b>this is a top page</b>
</body>
</html>
<html>

Top file
<head>
<title>this is a left page</title>
<style  type="text/css">
<!--
h1{font-family:monotype corsiva, font-style;bold;color:brown;};
b{font-family:monotype corsiva, font-style;italic;color:red;background-color:gray;}
-->
</style>
</head>
<body bgcolor="pink" style="float: right">
<h1>Welcome</h1>
<b>this is a left page</b>
<p><p><p>
<a href=right1.htm target=f3> Right1 page</a><br>
<a href=right2.htm target=f3>Right2 page</a><br>
<a href=right3.htm target=f3>Right3 page</a><br>
</body>
</html>

Right1.html
<html>
<head>
<title>this is a right1 page</title>
<style  type="text/css">
<!--
body{ background:"orange";};
h1{font-family:monotype corsiva, font-style;bold;color:brown;position:absolute;left:400;top:100;};
p{font-family:monotype corsiva;color:red;position:relative;top:115;
 font-size:19pt;}
-->
</style>
</head>
<body>
<h1> this is a right1 page</h1>
<p>this is a right1 page</p>
</body>
</html>

Right1.html

<html>
<head>
<title>this is a right2 page</title>
<style  type="text/css">
<!--
body{ background:"blue"};
h1{font-family:monotype corsiva, font-style;bold;color:brown;position:absolute;left:400;};
p{font-family:monotype corsiva, font-style;italic;color:red;position:absolute;top:115;
 font-size:19pt;}
-->
</style>
</head>
<body>
<h1>Welcome to right2 page </h1>
<p>this is a right2 page</p>
</body>
</html>

Right3.html
<html>
<head>
<title>this is a right3 page</title>
<style  type="text/css">
<!--
body{background:tan;}
h1{font-family:monotype corsiva, font-style;bold;color:white;position:absolute;left:400;};
p{font-family:monotype corsiva, font-style;italic;color:silver;position:absolute;top:115;
 font-size:19pt;background-color:gray}--></style></head>

<body bgcolor="black">
<h1> this is a right3 page</h1>
<p>this is a right3page</p>
</body></html>

Bottom File
<html>
<head>
<title>bottom</title>
<style  type="text/css">
<!--
body{background-color:lavender;};
h1{font-family:times new roman, font-color:indigo;position:absolute;left:400;};
p{font-family:monotype corsiva;color:red;position:absolute;top:50;font-size:19pt;};
-->
</style>
</head>
<body >
<h1>Welcome to bottom page</h1>
<p>This is a bottom page</p>
</body>
</html>


 Client Image mapping
<html>
<head>
<title>image mapping</title>
</head>
<body bgcolor="plum">
<img src="C:\ PICTURES\NATURE1.jpg"  height="400" width="500" usemap="#M1" border="5">
<MAP NAME="M1">
<center>
<font face="Garamond" color="indigo" size="5"><b>IMAGE MAPPING</b></font>
<AREA SHAPE="RECT" COORDS="0,0,120,170"
HREF="http://www.yahoo.com" alt="ATTITUDE!">
<AREA SHAPE="CIRCLE" COORDS="250,200,75"
HREF=" http://www.google.com "
ALT="OPPURTUNITY!">
<AREA SHAPE="POLY" COORDS="400,400,500,300,500,400,400,400,"
HREF=" http://www.orkut.com "
ALT="INEPTITUDE!">
</BODY>
</HTML>



Event Driven Client side Scripting with frames
Frame.html
<html>
<head>
<title>FRAME</title>
</head>
<frameset rows="30%,43%,27%">
<frame name="f1" src="top.htm">
<frameset cols="20%,80%">
<frame name="f2" src="left.htm">
<frame name="f3" src="right.htm">
</frameset>
<frame name="f4" src="bottom.htm">
<noframes>
<body>
</body>
</noframes>
</frameset>
</html>
Top.html
<html>
<head>
<title>New Page 1</title>
<script language="javascript">
function cld(clr,id)
{
            var clr,id
            var x,y
            x=window.parent
            y=x.parent
            id=parseInt(id)
            y.frames[id].document.bgColor=clr
}

            function refr()
            {
                        var x,y
                        x=window.parent
                        y=x.parent
                        y.frames[1].document.bgColor="white"
                        y.frames[2].document.bgColor="white"
                        y.frames[3].document.bgColor="white"
            }
</script>
</head>
<body>
<input type="button" value="RED" name="colour1" onClick=cld("Red",1);>
<input type="button" value="GREEN" name="colour2" onClick=cld("Green",2);>
<input type="button" value="BLUE" name="colour3" onClick=cld("Blue",3);>
<input type="reset" value="RESET" name="rs" onClick=refr();>
</body></html>

Left.html
<html>
<head>
<title>left</title>
</head>
<body bgcolor="black">
<center>
<font color="indigo" size="7">LEFT</font>
</center>
</body>
</html>
right.html

<html>
<head>
<title>right</title>
</head>
<body bgcolor="black">
<center>
<font color="Red" size="7">RIGHT</font>
</center>
</body>
</html>
Bottom.html
<html>
<head>
<title>bottom</title>
</head>
<body bgcolor="black">
<center>
<b><font color="tan" size="7">BOTTOM</font></b>
</center>
</body>
</html>



 Cross Browser Testing
<html>
<head>
<title>cross broswer </title>
<bgsound src="C:\Peter\Exp-5 Cross Browser Testing\Colour Blind.mp3" loop="-1">
</head>
<body>
<hr size="5" COLOR="AQUA">
<hr><CENTER>
<img src="C:\Peter\PICTURES\skull6.gif" alt="broken image" HEIGHT="100" WIDTH="150"></img></CENTER><CENTER>
<table border ="5" bordercolordark="black" bordercolorlight="orange" width="400" height="200">
<caption>
<font face="Comic Sans MS" color="blue" size="4"> cross bowser testing</font>
</caption>
<tr>
<td><font color="indigo" face="garamond"><b>Microsoft Internet Explorer</b></font></td>
<td><font color="indigo" face="garamond">Version:6.0</font></td>
</tr>
<tr>
<td><font color="red" face="garamond"><b>Netscape Navigator</b></font></td>
<td><font color="red" face="garamond">Version:9.5</font></td>
</tr>
</table></CENTER>
</body>
</html>


 Date Entry using ASP and MSAccess
<html>
<head>
</head>
<body bgcolor="lavender" text="blue">
<center><br><b>
<form name="form1" action="record.asp" method="post">
ENTER YOUR NAME&nbsp;
<input type="text" name="name" size="20" maxlength="18"><br><br>
<p>ENTER YOUR AGE
<input type="text" name="age" size="3" maxlength="3">
</p><p><input type="submit" name="submit1" value="SUBMIT"></p>
</form></body></html>

Record.asp
<% @ language=VBscript %>
<html><head></head><body>
<% dim nm,ag,chk
dim strcon,con,rs
            nm=Trim(Request.form("name"))
            ag=Trim(Request.form("age"))
            set con=server.Createobject("ADODB.CONNECTION")
            set rs=server.Createobject("ADODB.RECORDSET")
strcon="Provider=Microsoft.Jet.OLEDB.4.0;Data source=d:\Inetpub\wwwroot\Peterdata.mdb;Persist Security Info=False"
            con.Open  strcon
            'strSQL="Select * from peterstud"
                        if IsNumeric(ag) and nm<>"" then
                        chk="Insert into peterstud(name,age) values('"&nm&"','"&ag&"')"
                                    con.Execute chk
            Response.write "RECORD IS ADDED SUCCESSFULLY"
            else
            Response.write "PLEASE CHECK YOUR DATA ENTRY"
            nm=""
            ag=""
            End If%>         </body></html>

 SAVE EARTH'S ENVIRONMENT
Save Env.html
<html>
<head>
<title></title>
</head>
<Body Bgcolor="violet" Alink="green " Vlink="blue"><h2>
<Marquee  Direction="Right"  Behavior="Alternate"  bgcolor="seagreen"><Font face="Book antiqua" color="plum">SAVE THE ENVIORNMENT, SAVE THE WORLD....</font></h2></Marquee>
<Center><Img Src="C:/Natural/CANYON2W.JPG" Height="400" Width="600"></img><br>
<Font Face="Monotype corsiva" Size="+2" Color="skyblue">SAVE THE ENVIORNMENT</Font>
<HR Size="10%" Color="Red">
<A href="Causes.html" target="_blank" >EFFECTS OF POLLUTION</A><br>
<a href="Solution.html"  target="_blank" >PREVENTIVE SOLUTIONS</a><br>
<A href="Pollution watch.html"  target="_blank" >SUMMARY</a>

</body>
</Html>

Causes.html
<html>
<head>
<title>causes of pollution</title>
</head>
<body Bgcolor="lavender">
<a name="Causes"><Font face="Monotype Corosiva" size="+1" color="indigo">
<Font color="green">1. AIR POLLUTION:</font>
   <p>The effects of air pollution are as follows:-</p>
a)SMOG:
<br>1.It increases the casees of Lung Cancer.<br>2.Diseases like Bronchitis,Emhysema And Cardiac Failure Are Observed.<p>
b)SULPHUR DIOXIDE:<br >
1.It disturbes the respiratory rates.<br>2.IT irrritates the respiratory epitalial causing Rhinitis and Coughing.
<p>c)CARBON MONOXIDE:<br>1.Increases the level of CO released from automobiles and industrial plants called giddiness and headache.<p>
2.WATER POLLUTION:<p>
a)The sewage polluted water can spread many epidermic diseases like Cholera,Typhoid.<br>
b)Floating oils in the sea depletes oxygen contempt killing sea-life.<br>
c)Drinking water becomes unpleasent due to presence of free chlorine,phenol,ammonia and hydrogen sulphide.</font>
<br><br>
<center>
<a href="Save Env.html" align="right"><b>Go To Home Page</b></a>
</body>
</html>

Solution.html
<html>
<head>
<title>Preventive Solutions</title>
</head>
<body Bgcolor="Lavender">
<Font Color="Darkteal " size="+2">PREVENTIVE SOLUTIONS</font><p>
<Font Face="Garamond" color="indigo" size="+1">1.AIR POLLUTION:<p>
a)To put a ban on the nuclear tests.<br>
b)To plant more trees instead of erecting the cement jungle.<br>
c)To utilise the waste products for the manufacture of commercially viable products.<br>
d)To discharge the gaseous waste through sufficiently tall and properly designed smoke-stackes.
<p>2.WATER POLLUTION:<p>
a)Pollution by inorganic fertilisers can be avoided by the use of organic manures.<br>
b)The effluents from the industries should be properly treated and neutralised.<br>
c)Strict legislative measures should be inforced and strictly followed to control watwe pollution.<br>
d)Improved and proper method should be employed in handling the sewage before disposal in water.
<br><br>
<center>
<a href="Save Env.html" align="right"><b>Go To Home Page</b></a>
</body>
</html>


Pollution watch.html
<html>
<head>
<title>Summary</title>
</head>
<body background="C:\natural\a.jpg" text="blue">
<a name="Summary.html">
<font face="garamond" color="orange">
<center>
<table border="5" width="500" height="250" Bordercolorlight="green" bordercolordark="marron">
<caption align="bottom"><font face="Verdena" color="orange" size="6"><b> POLLUTION  WATCH</font></caption>
<tr align="center">
<b><th>City</th>
<th>SPM mug/m<sup>3</sup>
<th>SO<sub>2</sub>mug/m<sup>3</sup>
</tr>
<tr align="center">
<b><b><Td>Pune</td>
<td>320</td>
<td>4</td>
<td>40</td>
</tr>
<tr align="center">
<td>Kolhapur</td>
<td>225</td>
<td>5</td>
<td>25</td></tr>
<tr align="center">
<td>Ajara</td>
<td>300</td>
<td>&nbsp;</td>
<td>30</td></tr>
</table>
<br><br>
<center>
<a href="Save Env.html"><b>Go To Home Page</b></a>
</center>
<h1>Customer feedback</h1>
<form name="input" method="get">
First name: <input type="text" name="FirstName" size=20><br>
Last name: <input type="text" name="LastName" size=20><br>
Comments<textarea rows=5></textarea>
<input type="submit" value="Submit">
</form>
</body>
</html>


VIDEO WITH CONTROLS AND WITHOUT CONTROLS
<html>
<head>
<title>videoembed tag</title>
</head>
<body bgcolor="lavender">
<center><h2>A VIDEO CLIP FILE OF AN EMBED TAG. </h2>
<embed src="C:\CLOCK.AVI" WIDTH="400" HEIGHT="350" AUTOSTART=FALSE LOOP=TRUE></center>
</body>
</html>
<html>
<head>
<title>video_im g tag</title>
</head>
<body  bgcolor="#aabb cc">
<h2>A VIDEO  CLIP FILE  OF AN IMG -  TAG  WITHOUT  CONTROLS.  </h2>
<center><Img  dynsrc="AVSE Q17.DAT"  width="400"  height="250" 
   loopdelay="150 0"  start="Mouseov er"  Border="5">
</body>
</html>