views:

254

answers:

1

Ok so my main window is going to open up a popup window, the popup window is going to contain a Flex app.

The flex app is going to need to navigatToURL() but also send POST data along with it.

However instead of the popup-window navigating, I would like to main-window to navigate to the url and recieve the post vars.

Is this possible?

Thanks!

+1  A: 

You would have to use ExternalInterface to call a javascript function in your popup window (Your Flex app does not know that it is in a popup window).

IN the function, you'll need to submit a form through the opener (you can call a javascript function of the opener like this: window.opener.func();)

See this link for more information on ExternalInterface.

Gabriel McAdams
Note, to get this to work I needed to add empty hidden forms inputs on the opener page, then pass the values from flex via ExternalInterface, then use JavaScript to fill the hidden form inputs with the right values, before submitting the form. But then it worked. Thanks.
John Isaacks
That was exactly what I was thinking. Sorry my answer wasn't as complete as it should have been. I'm glad you got it working.
Gabriel McAdams