Frame: modify rows="80,*" value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Max

    Frame: modify rows="80,*" value

    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.ht ml">
    <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.ro ws = 400;

    How Can I do it ?

    Thank you so much,
    m.


  • Martin Honnen

    #2
    Re: Frame: modify rows=&quot;80,* &quot; value



    Max wrote:

    [color=blue]
    > 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.ht ml">[/color]

    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.
    [color=blue]
    > <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.ro ws = 400;[/color]

    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 .getElementsByT agName && (frameset =
    parent.document .getElementsByT agName('framese t')[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

    Comment

    Working...