In JavaScript when to use window.opener / window.parent / window.top ?
top, parent, opener (as well as window, self, and iframe) are all window objects.
window.opener -> returns the window that opens or launches the current popup window.window.top -> returns the topmost window, if you're using frames, this is the frameset window, if not using frames, this is the same as window or self.window.parent -> returns the parent frame of the current frame or iframe. The parent frame may be the frameset window or another frame if you have nested frames. If not using frames, parent is the same as the current window or self