Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3301376
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:44:43+00:00 2026-05-17T20:44:43+00:00

I have a struts application being used on handheld devices running Windows CE 4.2/5.0.

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T20:44:43+00:00Added an answer on May 17, 2026 at 8:44 pm

    Not sure about Windows CE but with JavaScript you can use 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 parent.html file:

    <html>
    <head>
    <script type="text/javascript">
        function openPopup() {
            window.open("child.html", "", "dependent=yes,directories=no,height=400px,width=600px,menubar=no,resizable=yes,scrollbars=yes,status=yes,title=yes,toolbar=no");
        }
    </script>
    </head>
    <body>
    <input type="text" name="txt" id="txtId" value="blah" />
    <input type="button" name="btn" value="Open popup" onclick="openPopup();" />
    </body>
    </html>
    

    and this as child.html:

    <html>
    <head>
    <script type="text/javascript">
        function goToParent() {
            window.opener.focus();
            window.opener.document.getElementById("txtId").focus();
            window.close();
        }
    </script>
    </head>
    <body>
    Push the button to close this window and focus on the parent's textbox<br />
    <input type="button" name="btn2" value="Close popup" onclick="goToParent();" />
    </body>
    </html>
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
This is for a web application using struts. I have an array of objects
I am developing a web application using Struts 2.1.2 and Hibernate 3.2.6.GA. I have
I have a struts2 application with a single page that may show one of
I'm trying to have my Struts2 app redirect to a generated URL. In this
It's a Struts application. I have to show some dynamic date in the left
I have a Java web application that has a 'disconnected' Java Swing desktop app.
I have a Struts + Velocity structure like for example, a Person class, whose
I have a Struts (1.3x) ActionForm that has several String and boolean properties/fields, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.