Max wrote:
I have a problem with javascript.
Basically I have a frame that is split with this code:
<frameset rows="0,*">
<frame name="top" src="nothing.html">
Naming a frame 'top' is not a good idea if you want to use script to
access frames as top is already predefined to be the top most containing
window.
<frame name="center" src="page.html">
</frameset>
What I need is the ability to redimension the frame with javascript !
If i load an "image.jpg" in top frame, the image isn't showed because the rows is 0.
So i need to change size from 0 to 100 dinamically, example:
top.document.rows = 400;
You need to change the rows property of the frameset element to a new
value e.g. in page.html
var frameset;
if (parent && parent != window &&
parent.document.getElementsByTagName && (frameset =
parent.document.getElementsByTagName('frameset')[0]))) {
frameset.rows = '100, *';
}
But expect browser to have difficulties adjusting frame size, that
doesn't work relyably and some browsers reload the pages in the frames then.
--
Martin Honnen
http://JavaScript.FAQTs.com/