Background Window dissappearing

Posted on 2011-10-23
Last Modified: 2012-07-24

I am working on some javascript code for a help button that open a help popup window.
Sample code as follows:

var HelpWindow = ...);

This code opens a Help popup window in the foreground when the Help button from the parent window is pressed. The problem that I have, is when I close the Help popup Window, the parent Window dissapears. I have to click on the screen with the mouse pointer and the background Window re-appears.

I have been reading that I might need to add some kind of recursive timer to check if the Help popup window is Closed HelpWindow.closed or something to reset the focus(). Or maybe reset the focus like


Not sure how to resolve this issue ?
Has anyone ran into this problem ?
Suggestions ?

Question by:ptreves
    LVL 4

    Expert Comment

    Do you have a link to the site? Or some sample code?

    Author Comment

    Here is the javascript function:

     * Shows the current {@link #helpUrl} in a new window.
    function showHelp() {
        var fullHelpURL = "$helpDirectory" + helpUrl;

        helpWindow =, 'Help', 'width=650,height=500,
        var timer = setInterval(function() {    
           if(helpWindow.closed) {  
        }, 200);

    In the timer loop, I am thicking of either one of the following statements:



    Accepted Solution

    How can I reset the focus to the parent Window when I close the popup ?

    Author Comment

    Can you show me some sample code to do that ?


    Author Closing Comment

    solved problem

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
    Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now