frameElement question

Discussion in 'JavaScript' started by deluxmilkman, Oct 3, 2007.

  1. #1
    i have this on my main html.
    
    <head></head>
    <frameset rows="110,*" cols="*" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF">
      <frame src="top.html" name="top" frameborder="no" scrolling="no" id="top">
    <frame src="bottom1.html" name="bottom" id="bottom">
    <noframes><body>
    
    </body></noframes>
    
    
    HTML:
    and i would like to change the "bottom frame src" using something like this.

    
    
    function bottomChange(){
        var oFrame = window.frameElement;
        oFrame.src = "bottom2.html";
    }
    
    
    HTML:
    now if im writing this function on "top.html" what "window.frameElement" section should be?
     
    deluxmilkman, Oct 3, 2007 IP
  2. ezpz

    ezpz Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try

    parent.frames['bottom'].location.href = "bottom2.html"
     
    ezpz, Oct 4, 2007 IP