Sunday, January 14, 2018

EVENT DRIVEN CLIENT SIDE SCRIPTING

<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>

<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>

<html>
<head>
<title>left</title>
</head>
<body bgcolor="black">
<center>
<font color="indigo" size="60">LEFT</font>
</center>
</body>
</html>

<html>
<head>
<title>right</title>
</head>
<body bgcolor="black">
<center>
<font color="Red" size="60">RIGHT</font>
</center>
</body>
</html>

<html>
<head>
<title>bottom</title>
</head>
<body bgcolor="black">
<center>
<b><font color="tan" size="60">BOTTOM</font></b>
</center>
</body>
</html>





5 comments: