By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Frame: modify rows="80,*" value

P: n/a
Max
Hello everybody,
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">
<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;

How Can I do it ?

Thank you so much,
m.
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


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/
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.