Client Side Scripting Unit-5 (Frames Pyq's)
Client Side Scripting Unit-5 (Frames Pyq's)
Frames
W-19
Q.6. (b) Write a script for creating following frame structure (6M)
FRAME 1
FRAME 2 FRAME 3
FRUITS
FLOWERS
CITIES
FRUITS, FLOWERS and CITIES are links to the webpage fruits.html, flowers.html, cities.html respectively. When these
links are clicked corresponding data appears in FRAME 3.
Ans.
1)main.html
<html>
<frameset rows="10%,90%">
<frame src="frame1.html" name="f1"></frame>
<frameset cols="50%,50%">
<frame src="frame2.html" name="f2"></frame>
<frame src="frame3.html" name="f3"></frame>
</frameset>
</frameset>
</html>
2)frame1.html
<html>
<body>
<h2 align="center">Frame 1</h2>
</body>
</html>
3)frame2.html
To show the content of fruits.html and other files in “Frame 3” you have to set the target to the name of the
Frame 3
1
Unit-5 Frames Vikas Patil
W-22
Q.5. (c) Write a JavaScript for creating following frame structure: (6M)
TYIF (Frame1)
Chapter 1 and Chapter 2 are linked to the webpage Ch1.html and ch2.html respectively. When user click on
these links corresponding data appears in FRAME3.
S-22
Q.1 Write a javascript syntax to accessing elements of another child window. (2M)
Q.6. (a) Write a javascript to open a new window and the new window is having two frames. One frame containing
button as “click here !”, and after clicking this button an image should open in the second frame of that child window.
(6M)
S-23
Q.6. (b) Write a script for creating following frame structure : (6M)
Frame 1 contains three buttons SPORT, MUSIC and DANCE that will perform following action :
When user clicks SPORT button, sport.html webpage will appear in Frame 2.
When user clicks MUSIC button,music.html webpage will appear in Frame 3.
When user clicks DANCE button,dance.html webpage will appear in Frame 4.
FRAME 1
SPORT MUSIC DANCE
1.Main.html
<html>
<frameset rows="30%,70%">
<frame src="frame1.html" name="f1"></frame>
<frameset cols="33%,33%,*">
<frame src="frame2.html" name="f2"></frame>
<frame src="frame3.html" name="f3"></frame>
<frame src="frame4.html" name="f4"></frame>
</frameset>
</frameset>
</html>
2
Unit-5 Frames Vikas Patil
2. frame1.html
Consider sport.html, music.html and dance.html with containing information.
<html>
<body>
<h1 align="center">Frame 1</h1>
<center><a href="sport.html" target="f2"><button>SPORT</button></a>
<a href="music.html" target="f3"><button>MUSIC</button></a>
<a href="dance.html" target="f4"><button>DANCE</button></a></center>
</body>
</html>
3. frame2.html
<html>
<body>
<h1 align="center">Frame 2</h1>
</body>
</html>
4. frame3.html
<html>
<body>
<h1 align="center">Frame 3</h1>
</body>
</html>
5. frame4.html
<html>
<body>
<h1 align="center">Frame 4</h1>
</body>
</html>
W-23
Q.6. (c) (i) Design frameset tag for representing following layout : (3M)
FRAME 1
S-24
Q.4. (a) State what is frame? Explain how it can be created with suitable example.(4M)