SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    a first window opens another window. From this last one, I want to refresh the first window and close the second with a button.

    I used the following function, but it doesn't seem to work:


    <script language="JavaScript">
    function goback()
    {
    window.opener.reload();
    window.close();
    }
    </script>


    and then called the function with a button


    <input type="button" value="Close this window" OnClick="goback()">

    What's wrong with that?
    Thanks

  2. #2
    I believe you have my stapler. scrubz's Avatar
    Join Date
    Feb 2001
    Location
    Van down by the river
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of window.opener.reload(); use
    window.opener.location.reload();

    That should do it.

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    re

    yes it did work great.
    Thanks a lot

  4. #4
    SitePoint Zealot
    Join Date
    Mar 2001
    Location
    Austin,TX
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what's the difference between "reload" and "refresh"?

    -S
    VARhosting.net - Value-added Reseller Hosting
    http://www.varhosting.net

    24x7 Support for YOUR hosting customers!




  5. #5
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ?I don't see any difference


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
  •