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 Coder
    Join Date
    Mar 2009
    Posts
    96
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Popup refresh quickie

    Hi,

    I have a pop-up window that I want to auto refresh the parent page when it is shut.

    At the moment I am using the code below to do this if the user clicks a 'close window' link in the popup. BUT is there a way to auto refresh the parent page if the user just clicks the red cross at the top right of the popup?

    <script>
    function closePopup(){
    window.opener.location.href = window.opener.location.href;
    window.opener.focus();
    window.close();
    }
    </script>

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,908
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Nope. Nor can you stop the user closing the window with Ctrl-W.



    A child of five would understand this. Send someone to fetch a child of five. - Groucho Marx


  •  

    Posting Permissions

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