posted 19 years ago
There is a fun solution for this, that works in IE only (and may not work in some versions)
The trick is in using IE bug (or feature?) that custom properties assigned to window.location are not getting removed when window is reloaded, i.e. if you open a window using:
window.location.wnd = window.open("something","something");
, then reload the page, and than call
window.location.wnd.close()
, it will close that new window. The same way you can keep there an Array of windows, if you want.
Another solution is to name each window diferently and every time page reload send list of names to the server and get it back in the same page. Then you can loop throught the names, and try to open a page with the only line self.close() for every window name you have. (Can be very messy)