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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:48:39+00:00 2026-05-17T02:48:39+00:00

My javascript code open some windows trough: var win = window.open(); I store the

  • 0

My javascript code open some windows trough:

var win = window.open();

I store the win refernce in an array with all the other opened windows.
Everything works fine, until the opener is refreshed.

So what i’d like to achive is to get back all the references to the opened windows when the “master” window is loaded.

To realize this i have to:
1. persist all the references on unload
2. get back the references on load
3. update the references with the new opener

Is it possible? if so how?

  • 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-17T02:48:40+00:00Added an answer on May 17, 2026 at 2:48 am

    How I solved the issue.

    The child window “opener” property keeps a reference to the WINDOW that opened it, so when the master window is refreshed the window doesn’t change, so the opener reference is still the same.
    The only case when the opener is null is when the window is closed*

    On the unload event of the master window, I call a javaScript function on the child window that sets a timeout. When the timeout ends I test the opener reference and try to register back because the reference is still correct.

    This way I have all the child references back!! 😉

    Of course, if the document loaded in the master window is not my document, but, for example, http://www.google.com registering back the child reference fails.

    This solution has been teste under Firefox, IE and Chrome.

    *in Chrome when you type a new address it start a new window, so opener will be null as well.

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

Sidebar

Related Questions

My javascript code is like this: function openWindows() { if(A is true) { window.open(URL_A);
I create a secondary browser window with Javascript code, using the window.open function, and
I am trying to open a new window and write some elements and javascript
I have code which returns some other page (Google) in a popup (child) window.
I have some very simple javascript code that looks like this: var newWindow =
javascript code: function getCheckbox(name,id){ var check = 0; var deger = option-checkbox-+id; var dom
Javascript Code YAHOO.util.Event.onDOMReady(function (ev) { var carousel = new YAHOO.widget.Carousel(container, {isCircular: true, numVisible:1}); console.log(carousel.set('navigation',
My JavaScript code is as follows: $(document).keydown(function(event){ var move, inter; clearInterval(inter); inter = setInterval(move
The JavaScript code window.print() can print the current HTML page. If I have a
I have put together some code from various sources but javascript is somewhat unknown

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.