- Have the popup window's php script call the original window's php script
That would require client-side interaction by PHP, which is of course impossible.
- Have the original script listen for an onunload() event of the popup window
Like so:
Code:
<body onunload="window.opener.location.href = window.opener.location.href;">
For some reason, I'm finding it incredibly difficult to even find an example of how to handle a window's events.
Well, there are plenty out there.
I can't believe how poor JavaScript documentation is online.
The definitive reference is, of course, ECMA RFC 262.
Bookmarks