I have a struts application being used on handheld devices running Windows CE 4.2/5.0.
We needed the functionality of another app in this one, and the solution was to pop up a window to the other app (using window.open()), run the process, and then close the window to return to the original app.
Normally our apps always focus on a specific textbox after an action. When the new window closes, the original window does not become the active window, and I'm having a hard time figuring out how to activate the window and focus on the textbox.
Is there a way to control which window becomes active when it closes and to trigger a focus event on the required field?
Thanks in advance for your help.
EDIT: In case anyone comes across this question, it turns out accessing window.opener is not available in Windows CE unless the OEM specially included it in their version of the OS. See this knowledgebase article for more information.
window.opener to refer to the parent window from within a popup. I wrote a little example to demonstrate. Hope it will be of help to you:
Save this as
and this as
Your popup should close and focus should be gained by the calling page, even if it is in the background or there is some other windows on top.