Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: closed popup window reopens when browser back button is invoked

Reply
Thread Tools

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

 
 
mike
Guest
Posts: n/a
 
      10-17-2003
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Etan Patz case reopens richard Computer Support 1 05-30-2010 10:03 PM
ASP.NET JavaScript Popup, No Popup Using Back Button dapkniht ASP .Net 1 03-08-2006 08:49 AM
Refresh main browser window when secondary window is closed. =?Utf-8?B?R2FyeQ==?= ASP .Net 1 11-11-2005 04:14 PM
Images: A Texaco Station Reopens After Wilma Dean S. Lautermilch Digital Photography 10 10-29-2005 08:49 PM
Opera - .closed not accessible if window is closed? Matt Kruse Javascript 5 09-09-2003 01:27 AM



Advertisments