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

  • SEARCH
  • Home
  • 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 3803470
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:22:05+00:00 2026-05-19T14:22:05+00:00

Friends In our application, we have a parent window A , and then there

  • 0

Friends

In our application, we have a parent window A , and then there is window B which spawns out of window A and then window C spawns out of window B and then several other windows spawns out of window C When I logout from window A , only window B gets closed , it DOES NOT close window C and its childs

The script that is currently in use is as below.

 function Close(frm) {
    var win;
    if(window.opener)
    {
    win = window
    }else if(window.parent.WinObjectArray)
    {
    win = window
    }
    else
    {
    win = window.parent;
    }
    if(!win.parent.WinObjectArray)
    win = win.parent;

    if(frm=='logout')

    {
    if(window.WinObjectArray !=null && window.WinObjectArray!=undefined)
    {
       for(i=win.parent.WinObjectArray.length-1;i>=0;i--)

           {
                if(!win.parent.WinObjectArray[i].closed) 
                 win.parent.WinObjectArray[i].close();
            }
          return ;
    }
    }
    var closeWinArray = new Array();
    closeWinArray[0] = window;
    if(window.WinObjectArray !=null && window.WinObjectArray!=undefined)
    {
        for(i=0;i<win.parent.WinObjectArray.length;i++)
         {
           var openerFnd = false;
             for(j=0;j<closeWinArray.length;j++)
               {
              if(!win.parent.WinObjectArray[i].closed && win.parent.WinObjectArray[i].opener == closeWinArray[j])
                {
                closeWinArray[closeWinArray.length] = win.parent.WinObjectArray[i];
                openerFnd = true;
                }
               else if(win.parent.WinObjectArray[i].closed)
                  {
                    openerFnd = true;
                  }
                 }
    if(openerFnd){
    win.parent.WinObjectArray.splice(i,1);
    i=i-1;
    }
    }
    }
    if(window.WinObjectArray !=null && window.WinObjectArray!=undefined)
    {
    for(i=0;i<win.parent.WinObjectArray.length;i++)
    {
    if(win.parent.WinObjectArray[i] == window)
    {
    win.parent.WinObjectArray.splice(i,1);
    break;
    }
    }
    closeWinArray.splice(0,1);
    for(i=closeWinArray.length-1;i>=0;i--)
    {
    if(!closeWinArray[i].closed) 
    closeWinArray[i].close();
    }
    }
        for (i=0;i<WindowArray.length;i++){
        if (! WindowArray[i].closed) {
        WindowArray[i].close();
        }
    }
}
  • 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-19T14:22:06+00:00Added an answer on May 19, 2026 at 2:22 pm

    Just have window A become the liason for all your window spawns. Its easy to call to the parent to write up a new window for child processes/windows. So if you route all your window functions to and from the parent you will no longer have this issue. The parent [A] will have permission and full control of all child windows under this setup.

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

Sidebar

Related Questions

We are now testing our application with a few friends. Sometimes there are some
Friends, In testing our Oracle Forms application on Vista I have found a interesting
How to access Facebook friends list in to our android application using Facebook API
friends, i have created custom title bar using following titlebar.xml file with code <?xml
Friends, I like to know using which version of Android SDK we can develop
Friends, I have a strange need and cannot think my way through the problem.
friends, i have a EditText on simple activity with a button. when every i
I'm starting to write a application in php with one of my friends and
we have a problem with our applications. We have recently upgraded our toolchain to
We've developed a web application where people can sign-up on our website to make

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.