views:

34

answers:

2

So, I have a browser window that if you click on a specific button on it, it opens another window next to it, resizes the first window and then puts the new window next to it. This is great, however, I want the first window (the original one) to go to full size when the 2nd one is closed. (Whenever the user closes the 2nd window he/she opened through clicking on the button, the first window should go to full size). Is there a way to do that?

Note: I don't mean there will be a (close) button on the 2nd one, when the user closes the window the normal way by clicking on the (x) is there a way to know that the user did that and maximize the first original window?

Thank you so much :)

A: 

Use onunload event in the child window to notify the parent.

Larry K
A: 

Firefox has a window.onclose event that does exactly what you want. Unfortunately, it's not part of the standard, so on other browsers, window.onunload is your only choice.

casablanca