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?
|