When frames reload

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher Benson-Manica

    #1

    When frames reload

    In the course of trying to solve the scrollbar problem in my previous
    post, I came up with the following code. It works in that it changes
    the scrolling attribute for the frame I'm interested in, but the new
    problem is that Firefox and Netscape 7.1 reload the button frame (IE 6
    does not). Since the real application behind this exercise involves
    a frameset with three CGI's, it would be horrific to redundantly load
    two CGI's simply to change the scrolling attribute of one of the
    frames. SOMEONE SHOOT ME I'M IN HELL!! (help would be gratefully
    accepted :-)

    <html>
    <head>
    <title>foo</title>
    <script type="text/javascript">
    var foo=true;
    var frame;
    var set;
    function ready() {
    frame=document. getElementById( 'mainFrame' );
    set=document.ge tElementById( 'set' );
    }
    function toggle() {
    foo=!foo;
    document.docume ntElement.remov eChild( set );
    for( var idx=set.childNo des.length-1; idx >= 0; idx-- ) {
    if( set.childNodes[idx].tagName != null && set.childNodes[idx].tagName.toUppe rCase() == 'FRAME' ) {
    set.removeChild ( set.childNodes[idx] );
    break;
    }
    }
    var f=document.crea teElement( 'frame' );
    f.src='foo.html ';
    f.scrolling= foo ? 'yes' : 'no';
    set.appendChild ( f );
    document.docume ntElement.appen dChild( set );
    }
    </script></head>
    <frameset cols="50%,*" onload="ready() " id="set">
    <frame src="button.htm l">
    <frame id="mainFrame" src="foo.html" scrolling="yes" >
    </frameset></html>

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
  • VK

    #2
    Re: When frames reload

    see my reply to "what caused onresize event behavior to change?"

    Comment

    Working...