开发者

Make changes to a browser window once another window is closed

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 2开发者_如何转开发nd 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 :)


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜