I have the same problem but the solution over do not solve it.
I want to have a Value from (B) in (A).
In my case I have a Rotator in my Window and want to have the
CurrentIndex in (A). I have already a "Close"-Button which works good. But I
want the same behaviour on the X-Button of Window (B).
Call a js-function of window (B) when regular closebutton from window is pushed.
I hope you understand my problem.
I already tried this: Overwrite the Close Method
but doesn´t work.