SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member DroppedAtBirth's Avatar
    Join Date
    Apr 2001
    Location
    Tempe, Az
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reload window after pop-up window closed

    Here is the situation. I have a script that when you click on a form button it post the results in a new pop-up window - and doesn't change the origin window. I then create a close.window on the pop-up window to close it. I now want to make it so the origin page is reload/refreshed after the pop-up is closed via the link. I have tried a few things but can't seem to get it to work. I need a javascipt guru to help.
    ~~~~~~~~~~~~~~~~~~~~~
    Robert Ward
    webmaster@droppedatbirth.com
    ~~~~~~~~~~~~~~~~~~~~~

  2. #2
    SitePoint Member DroppedAtBirth's Avatar
    Join Date
    Apr 2001
    Location
    Tempe, Az
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Figured it out. I decided to post the results instead of deleting this post. Maybe someone looking for the same answer will find it.

    All you need is this code on your pop up page. Change it to fit your needs.


    Code:
    <script language="JavaScript" type="text/javascript">
      <!--
    function kill_me(){
        opener.location.reload(true);
        self.close();
        }
      // -->
    </script>
    
    <a href="#" onclick="javascript: kill_me()">test</a>
    ~~~~~~~~~~~~~~~~~~~~~
    Robert Ward
    webmaster@droppedatbirth.com
    ~~~~~~~~~~~~~~~~~~~~~


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
  •