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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2002
    Location
    California
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passing a URL to Iframes

    Does anyone now of a way to pass a new URL to an IFrame via another pages onLoad event?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sort of depends where the iframe is in relation to the onload page. Just follow the window heirarchy backwards to the top document of the iframe holding page and then downwards to the iframe -- eg

    window.opener.top.frames[3].iframename.location.href = "newpage.htm";
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #3
    New to the CF scene
    Join Date
    Sep 2002
    Location
    California
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    I actually just figured out what I was trying to do. It got a little long winded but it works.

    <Body onLoad="top.frames['Framename'].document.iFrameName.location.href='URL';">


  •  

    Posting Permissions

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