PDA

View Full Version : risizing frames



cj5cowboy
Nov 24th, 2007, 10:37 PM
Hello I am new here, so I don't know if it's FAQ...

I am trying to resize a frame, works just fine in mozilla but not in IE.

here's the html :

<frameset id='myFrame' COLS="33%, 33%, 33%" ROWS="33%, 33%, 33%" FRAMESPACING=0 BORDERCOLOR="#CCCCCC">
<frame id='menu-1' src="1.shtml" scrolling="no">
<frame id='menu-2' src="2.shtml" scrolling="no">
.... etc etc etc...
</frameset>

the "script" I use in 2.shtml to resize frame 1 is (it's really only a one liner)


function scrollOn(frameid, onoff)
{
frameObj = parent.document.getElementById(frameid);

frameObj.style.overflow = 'auto';
}


any ideas ?
thanks,

Ron

shyam
Nov 26th, 2007, 09:15 AM
in IE u reference frames using the window.frames collection give a name to ur frame and u can reference it using


function scrollOn(frameid, onoff) {
frameObj = window.frames[frameid];
frameObj.style.overflow = 'auto';
}