1) When the item configuration is done and the window is closed
(using Javascript) I get the annoying The webpage you are using is
trying to close the window and you have to verify that you want to
close the window.
If you don't have any control over the code in the window that's
closing the window it's hard to see how you can overcome this - am I
right in thinking that the javascript involved here comes from teh
3rd party you mention?
2) I don't have any good way to detect the window was closed and then
fire off the web service to get the item configuration -- I basically
have to wait for the user to do something back in the Flex app that
causes an event to fire that I can trigger on. (I'm currently using
the focusOut event of the Quantity field in the item data grid, but
there's no guarantee the user will click/tab into a quantity field
and then back out after configuring an item...)
You could listen for the 'activate' event on the Application object
(or anything else, I think everything can fire it), that should be
triggered whenever the Flash player regains focus. This would avoid
the problem of the user not clicking in the right place that you have
with onFocus.
As to detecting the window closing, , I seem to remember that in
DHTML the window object fires an event called 'unload' when it is
closed, you could listen for the closing of the configuration window
in the HTML containing your SWF and then use external interface to
call back into Flex. You are at risk of opening the cross-browser
compatability can of worms with this though.
Hope this is of some help...
Stephen