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 64773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:50:33+00:00 2026-05-10T18:50:33+00:00

I have a main window (#1) on my webpage from which I open a

  • 0

I have a main window (#1) on my webpage from which I open a new browser window (#2) from which I open a new window (#3).

Now if my user closes window#2 before window#3, I have the problem that window#3 no longer can call function in its window.opener since it has gone away.

What I would like to do is to set window#3.opener to window#1 when window#2 closes.

I’ve tried to do this i window#2 (by the way I use jquery):

var children = []; $(window).unload( function( ) {     $.each( children, function( p, win ) {         if ( win ) {             win.opener = window.opener;             }     } ); } ); 

When window#3 is loaded I add the window to the array children in window#2.

But still when window#2 is closed before window#3, windows#3’s window.opener doesn’t point to window#1.

How do I make sure that my grand child window (window#3), can still call the main window (window#1) after window#2 is closed?

  • 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. 2026-05-10T18:50:33+00:00Added an answer on May 10, 2026 at 6:50 pm

    In the third wndow you put in:

    <script type='text/javascript'>   var grandMother = null;   window.onload = function(){     grandMother = window.opener.opener;   } </script> 

    Thus you have the handle to the grandmother-window, and you can then use it for anything directly:

    if(grandMother)       grandMother.document.getElementById('myDiv').firstChild.nodeValue ='Greetings from your grandchild !-'; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Air application with a main window. I would like to have
I have a scenario. (Windows Forms, C#, .NET) There is a main form which
i have a table called category in which i have main category ids and
I have a main asp.net app, which is written in asp.net 1.1. Runnning underneath
I have a main page that I want to be a sort of dispatch
I have a WebPage on which I have to detect and prevent usage of
I have the following code: $bind = new COM(LDAP://CN=GroupName,OU=Groups,OU=Division,DC=company,DC=local); When I execute it from
I have a problem with browsers window managament with javascript. I have two page
I have a main window: public class MainPanel extends JFrame implements MouseListener { public
I have a main window created with : if (!fullscreen) { wStyle = WS_OVERLAPPED

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.