SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    May 2004
    Location
    underworld
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Reloading Parent of Iframe after closing a Pop Up windows

    Firstly, I am a beginner in Javascript.

    Current situation:
    I currently have a page with an iframe.
    Inside the iframe i have a link to add data.
    By clicking on the add data link, it will open a new pop up windows.
    After entering the data, i have the option to add another or close.
    After closing, the pop up windows, I know how to reload the iframe.
    But what i want is to reload the whole windows, not just the iframe.

    on the close button in the pop up windows, i use onclick="opener.location.reload()'.
    but it will only reload the iframe as the opener is the iframe, not the whole window.

    Can someone please guide me thru this?

    Thanks in advance.

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well...you made it to the opener - that's nice - now just pop up to the top:
    Code:
    opener.top.location.reload()
    parent is synonymous, in the case of iframes.
    ::: certified wild guess :::

  3. #3
    SitePoint Member
    Join Date
    May 2004
    Location
    underworld
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OMG
    it's so simple yet i couldn't find out

    THANKS HEAPS !
    GBU

  4. #4
    SitePoint Member
    Join Date
    May 2004
    Location
    underworld
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how do i reload the bottom frame only, if the parent windows also consist of frames ( top frame is the menu frame, bottom frame named mainFrame)

    if i put opener.top.location.reload() it will load up the top of the frame.
    and it goes to the HOME page. instead of the last that i viewed.

    any suggestion?

    thx
    Last edited by vampiredust; May 23, 2004 at 20:52.

  5. #5
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    top doesn't refer to a frame named 'top', but to the topmost window (frame) object in the heap, which is the one holding the frameset document (the page with <frameset></frameset> tags). Never use it as a name - for anything. Try:
    Code:
    opener.top.mainFrame.location.reload();
    ::: certified wild guess :::

  6. #6
    SitePoint Member
    Join Date
    May 2004
    Location
    underworld
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i used opener.location.reload() and it worked well...

    in this case :
    opener.top.mainFrame.location.reload();

    mainFrame is the name of the frame correct?

    THANKS again...


Bookmarks

Posting Permissions

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