Re: closed popup window reopens when browser back button is invoked

Discussion in 'ASP .Net' started by mike, Oct 17, 2003.

  1. mike

    mike Guest

    A fixed this problem by using a unique id for the pop-up and a cookie.
    I check the cookie value to see if the window was displayed. If it
    does not exist or has a different value, I display the window and set
    the cookie value.




    //Displays the PDF if it has not already been displayed.
    function displayPDF(guid, URL, windowName)
    {
    //Look for the cookie value.
    //If if does not exist then display the window and then set the cookie
    value.
    var MyCookie = "DisplayCookie=" + guid;
    if (document.cookie.indexOf(MyCookie) < 0)
    {
    PDF_window = window.open(URL, windowName, 'resizable=yes');
    document.cookie = "DisplayCookie=" + guid;
    PDF_window.focus();
    }
    }


    "I'm Home" <> wrote in message news:<>...
    > We have a popup window that we open using <script>window.open( etc. in an
    > asp.net codebehind page.
    > It opens fine, we close it, and go to another page. As long as we click
    > tabs, links, etc. everything is fine but if we use the browser's back button
    > to return to the page that originally opened the poup, the "closed" popup
    > window comes "back to life", so to speak
    >
    > It may be something we can't get around since the browser has the page in
    > its temporary files. We've tried about everything we can think of to close
    > that window on load but can't find a good way to determine if it's open and
    > I'm not even sure if, timing wise, we could close that window with an
    > "onload" event.
    >
    > Does anyone have ideas for a solution?
    mike, Oct 17, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?R2FyeQ==?=
    Replies:
    1
    Views:
    503
    =?Utf-8?B?R2FyeQ==?=
    Nov 11, 2005
  2. dapkniht
    Replies:
    1
    Views:
    1,321
    Eliyahu Goldin
    Mar 8, 2006
  3. Matt Kruse
    Replies:
    5
    Views:
    298
    Richard Cornford
    Sep 9, 2003
  4. Raffi
    Replies:
    4
    Views:
    205
    Dr John Stockton
    Aug 12, 2004
  5. TM360
    Replies:
    2
    Views:
    187
    TM360
    Jun 30, 2005
Loading...

Share This Page