2

I have to write a web application with two monitor support. I'm using a window.open to load the second window in the second monitor.

It works, and when I want to close the main window I run this:

$(window).unload(function(){
    if(window2) window2.close();
});

This successufly close the second windows but I have a trouble: the last closing window is the second one, than the browser (firefox) save the second windows coordinates as default and when I open the browser again it will load that in the second windows. Opening and closing the browser windows flip from second to first monitor... How to close the second windows BEFORE the first one? I try something like "sleep" inside the unload function but seems that firefox stores last coordinates on close request and not after the unload.

Tobia
  • 9,165
  • 28
  • 114
  • 219

0 Answers0