1

I use window.open() to open a popup that will uses OAuth to redirect the user around and install my Twitter application, then closes itself.

Before closing itself however, I would like to send to the main window the username of the client. I tried var win = window.opener; followed by win.someFunction(username); but it is not working, I guess before the "opener" property is lost in the redirections that OAuth does.

Is there any way from the Child Window to find the Parent Window and send data? I checked and there is no window.setName('parent'); and getWindowByName('parent'); hehehe, that would be too good to be true.

UPDATE:

I am using 3-legged authorization

The thing I tried that I'm talking about in the second paragraph comes from this: is it possible to open a popup with javascript and then detect when the user closes it?

Community
  • 1
  • 1
NaturalBornCamper
  • 3,675
  • 5
  • 39
  • 58

1 Answers1

0

Well turns out I just put a time to detect when the window was closed then sent an AJAX request to get the data I needed.

NaturalBornCamper
  • 3,675
  • 5
  • 39
  • 58