Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    London, UK
    Thanked 110 Times in 109 Posts

    Frames (dom de dom dom)...

    Ugh. Getting my head in a right mess here.

    Got the following frameset/s:

    <frameset rows="63,*,31" frameborder=0 framespacing=0>
    		<frame name="fmTopbar" src="topbar.html" frameborder=0 framespacing=0 height=63 marginheight=0 marginwidth=0 scrolling="no">
    		<frameset cols="159,625" frameborder=0 framespacing=0>
    				<frame name="fmMenu" src="menu.html" frameborder=0 framespacing=0 width=159 marginheight=0 marginwidth=0 scrolling="auto">
    				<frame name="fmContent" src="home.html" frameborder=0 framespacing=0 width=625 marginheight=0 marginwidth=0 scrolling="auto">
    		<frame name="fmBottombar" src="bottombar.html" frameborder=0 framespacing=0 height=31 marginheight=0 marginwidth=0 scrolling="no">
    Now, I want to put an onLoad handler in the body tag of "home.html" (that loads into fmContent) that, when called, will reload "menu.html" into fmMenu.

    Something along the lines of:


    is that right? Did I miss something stoopid? Do I need to have some weird reccurring "window.parent.window.parent" type-thing going on with embedded framesets? Or am I simply barking up the wrong tree?


  • #2
    Senior Coder
    Join Date
    Aug 2002
    Thanked 0 Times in 0 Posts
    Well, when working with frame references like you are here, I always prefer to use an absolute reference to the frame, and include the frames collection


    However, since there is only 1 parent document, then this would work as well


    You will also notice that the reload() method is exposed to the window object's location object, and not to the document object.

    Remember here that parent is a reference to the parent window and NOT the parent frameset
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts