SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Dec 2001
    Location
    San Diego, CA
    Posts
    617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    refresh a window when closing pop-up

    I am creating an admin page where the user clicks on an item and a window pops up. They edit the information, and if the information is edited successfully, the window closes (this is mostly because I am too lazy to always close windows). I am using frames for the main page. When the window closes, I want the page in one of the frames to reload and show the page with the newly edited information.

    Hopefull that makes sense

    Thanks for any help.

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add this function to the page that opens the popup:
    function update()
    {
    document.myForm.mySubmitButton.click();
    }

    From the popup, when closing, call...
    window.opener.update();

    This should refresh the main page - if mySubmitButton is the button that you have to click if you want to refresh manually

  3. #3
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it's not the opening window you want to refresh, then find the frame using the top.frames collection
    If window.opener is the first frame (index 0), then the next frame is window.opener.top.frames(1)


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
  •