When I click a button, a window is popped up.
1. If I refresh or navigate off the main page, the wpop is unaccessible.
2. If I open the link as a new window (by target=_blank or window.open or Shift+Click), the wpop in new window is unaccessible too.
I think frame can solve this problems, but there are some restrictions below.
1. I do no create the main page and I cannot force the developers to use frames. If I want to use frame, I have to do something programmatically which is unable to guaratee that there is no target=_top in someone else's code.
2. The pages are not single page application. The pages must be able to refresh or navigate to other pages.
var wpop = null;
if (wpop==null || wpop=="undefined" || wpop.closed)
wpop = window.open("popwin.html", "wpop", "height=200,width=150");