Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Nested Iframes access

    thanks in advance for any help received.

    i have an html page with nested iframes.
    ex.
    page1.htm

    <html>
    <head>
    <body>
    <iframe name=frame1 id=frame1 src="page2.htm"><i/frame>
    </body>
    </html>

    page2.htm

    <html>
    <head>
    <body>
    <iframe name=frame2 id=frame2 src="about:blank"><i/frame>
    </body>
    </html>

    what i want to do is call a function to replace the blank page in frame2 from the top page. i have seen several references to this type of call:
    window.frames['framename'].frames['framename'].document
    but i can't seem to get it to work. i can use location.replace(pagename) to replace the html in frame1, but not frame2.

    Thanks in advance for help.

  • #2
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    found the answer to my own problem. i'll post for anyone else that may need.

    answer is this.

    frame1.frame2.location.replace(pagename)

    Thanks.


  •  

    Posting Permissions

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