How does one resize the frameset programatically through JavaScript?
Created May 4, 2012
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>