How does one resize the frameset programatically through JavaScript?

Jayesh Nazre

I have created one frameset with two frames in it. One of the frame has a button which when clicked will resize the Frameset. The MainFrame code :

<HTML> 
<HEAD></HEAD>
<TITLE>Main Frame</TITLE>

<FRAMESET COLS="50%,*" BORDER="0" 
  FRAMESPACING="0" FRAMEBORDER="YES"> 
<NOFRAME>You must use a browser that can display frames 
to see this page.</NOFRAME>
<FRAME NAME="left" SRC="left.html" >
<FRAME NAME="right" SRC="right.html">
</FRAMESET>

</HTML>
The left.html Code :
<HTML>
<HEAD>
<TITLE>LEFT</TITLE>
<script language=javascript>
function resizeframeset() {
parent.resizeTo (400, 300);
}
</script>
</HEAD>
<BODY bgcolor='Silver'>
<form name=frm_fs id=frm_fs>
<input type=button Value=ResizeFrameset 
  onclick=resizeframeset()>
LEFT
</form>
</BODY>
</HTML>
The right.html code :
<HTML>
<HEAD>
<TITLE>RIGHT</TITLE>
</HEAD>
<BODY>
RIGHT
</BODY>
</HTML>
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact