You are on page 1of 16

SERVER SIDE IMAGE MAPPING

Server.html

<html>
<body>
<a href="http://localhost/test/servermap/mapper.map">
<img src="snow.jpg" ismap></a>
</body>
<html>

Mapper.map

default http://localhost/test/servermap/kavi1.jpg
rect http://localhost/test/servermap/kavi.jpg 235,317,293,342
JAVASCRIPT APPLICATION

Bank.html

<html>
<head>
<script language="Javascript">

function ckaccno()
{
var ray =new Array(1111,1112,1113);
var name=new Array("vimal","priya","kavi")
var bool="true";
for(var i=0; i<ray.length;i++) {
if(document.form.text1.value==ray[i])
{ document.form.text2.value=name[i];
bool="false";
}

}
if(bool=="true")
alert("invalid accno number");
}
</script>
</head>
<body>
<form name="form">
<h1><center><b> WELCOME TO INDIAN BANK <b></center><br></h1>
<br><br><br><center>
ACC. NO&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type="text" name="text1" onBlur=ckaccno()><br><br>
NAME&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type="text" name="text2" ><br><br>
<BR><BR>
<input type="button" value=DEPOSIT onClick=ckaccno(),location="deposit.html">
<input type="button" value=WITHDRAW
onClick=ckaccno(),location="withdraw.html">
</center>
</form>
</body>
</html>
Withdraw.html

<html>
<head>
<script language="Javascript">
function ckaccno()
{
var ray =new Array(1111,1112,1113);
var name=new Array("vimal","priya","kavi")
var bool="true";
for(var i=0; i<ray.length; i++)
{
if(document.form.text1.value==ray[i])
{
bool="false";
}
}
if(bool=="true")
alert("invalid accno number");
}
function check()
{
var t=parseInt(document.form.text2.value);
t1=t-1000;
if(isNaN(t))
alert("Please enter the correct amount")
document.form.text3.value=t1
}
function no()
{
var t=document.form.text1.value;
alert("Your amount is with drawn from your account no "+t);
}
</script>
</head>
<body>
<form name="form">
<h1><center><b> WELCOME TO INDIAN BANK <b></center><br></h1>
<br><br><br><center>
ACC. NO&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type="text" name="text1" onBlur=ckaccno()><br><br>
AMOUNT&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type="text" name="text2" onBlur=check()><br><br>
BALANCE&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type="text" name="text3" ><br><br>
<BR><BR><input type="button" value=OK onClick=no(),location="bank.html">
</center>
</form>
</body>
</html>
Deposit.html

<html><head><script language="Javascript">
function ckaccno()
{
var ray =new Array(1111,1112,1113);
var name=new Array("vimal","priya","kavi")
var bool="true";
for(var i=0; i<ray.length; i++)
{
if(document.form.text1.value==ray[i])
{
bool="false";
}
}
if(bool=="true")
alert("invalid accno number");
}
function check()
{
var t=parseInt(document.form.text2.value);
t1=1000;
t1=t+t1;
if(isNaN(t))
alert("Please enter the correct amount")
document.form.text3.value=t1
}
function no()
{
var t=document.form.text1.value;
alert("Your amount is credited to your account no "+t);
}
</script>
</head>
<form name="form">
<h1><center><b> WELCOME TO INDIAN BANK <b></center><br></h1>
<br><br><br><center>
ACC. NO&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type="text" name="text1" onBlur=ckaccno()><br><br>
AMOUNT&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type="text" name="text2" onBlur=check()><br><br>
BALANCE&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type="text" name="text3" ><br><br>
<BR><BR><input type="button" value=OK onClick=no(),location="bank.html">
</center>
</form>
</body>
</html>
DEPOSIT
WITHDRAW
CLIENT IMAGE MAPPING

Clientmap.html

<html>
<head>
<title>
CLIENT SIDE MAPPING
</title>
</head>
<body>
<h1>CLIENT SIDE IMAGE MAPPING</h1>
</body>
<map name="mapper">
<area shape="Rect" coords="402,401" href="goto.html">
</map>
<img src="kavi.jpg" usemap="#mapper" border="15">
</html>

Goto.html

<html>
<head>
<h3>RESULTING PAGE OF CLIENT SIDE IMAGE MAPPING WHEN THE
COORDINATES ARE CLICKED</h3>
</head>
<img src="kavi1.jpg" border="4">
<html>

You might also like