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 9 of 9
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Northern California
    Posts
    50
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Iframes and reloading them

    I have the main window, within the main window, I have an iframe (call it iframe0), within iframe0 i have another iframe (call it iframe1), I calling a page in iframe1 to change some stuff on the server then I need to reload just iframe0.

    Everything ive tried, parent/top/by name..... , seems to reload the entire page. How can I just make Iframe0 reload without reloading the whole page?

    Thanks in advance.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    top.frames['iframe0'].reload();

    -or-

    parent.parent.reload(); *I think....

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    I had a play with a thought...it didn't hurt really ....
    Something like the following should do what you require.

    I have attached a zip file with the relative files in so you can see how it works.

    Opening the file called "main" will show an Iframe within an Iframe
    and the links will load another page to one or the other.


    <a href="#null" onclick="document.frame1.location.href='page.htm'">Load into Iframe 1</a>

    <a href="#null" onclick="document.frame1.document.frame2.location.href='page.htm'">Load into Iframe 2</a>
    Attached Files Attached Files

  • #4
    New Coder
    Join Date
    Jun 2002
    Location
    Northern California
    Posts
    50
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks for the help. unfortunately neither of those worked. Kept getting object not supported errors.

    I did finally manage to hit on the solution...
    top.custWindow.history.go(0);

    Thanks again.

  • #5
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    history.go(0) ??

    .reload() isn't working?

    I thought you were having trouble referencing the iframe, not acutally getting it to refresh?


  • #6
    New Coder
    Join Date
    Jun 2002
    Location
    Northern California
    Posts
    50
    Thanks
    2
    Thanked 0 Times in 0 Posts
    was trying to get it to reload/refresh.... I couldn't get reload to work for some reason, but history.go(0) seems to have the same effect.

  • #7
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, yes, it roughly has the same effect.

    Maybe
    top.custWindow.location.reload();

  • #8
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    was it for netscape?

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is what I use:

    Refresh:
    [<A HREF="javascript:window.frames.thisi.location.reload();">reload</A>]


    thisi being the NAME of the iFRAME.

    <IFRAME NAME="thisi" SRC="page.html"></iframe>
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·


  •  

    Posting Permissions

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